1import pandas as pd
2
3data = pd.DataFrame({'A' : [1, 2, 3, 4],
4 'B' : [1,2,3,4]})
5def test():
6 global data
7 data = data + 1
8
9test()
10
1import pandas as pd
2
3data = pd.DataFrame({'A' : [1, 2, 3, 4],
4 'B' : [1,2,3,4]})
5
6def test(data):
7 data = data + 1
8 return data
9
10data = test(data)
11