I've built two Pandas dataframes like this:
import panda as pd
d = {'FIPS' : pd.Series(['01001', '01002']), 'count' : pd.Series([3, 4])}
df1 = pd.DataFrame(d)
df2 = df1
I want to change one of the values in df2. This is what I've tried:
df2.loc[df2['FIPS'] == '01001','FIPS'] = '01003'
This line appears to update both df1 and df2, but I don't understand why.