import pandas as pd

df1 = pd.DataFrame({'A': [1, 2, 3]})
df2 = df1  # df2 引用 df1 的同一块内存

def modify1(df2):
	df2['A'][0] = 99  # 修改 df2
	
def modify2(df2):
	df2= df2[df2['A'][0]==99]  # 修改 df2
	
modify1(df2)
modify2(df2)

print(df1)  

