I have two dataframes:
df1
ID Name
15 Max
7 Stacy
3 Frank
2 Joe
df2
ID Name
2 Abigail
3 Josh
15 Jake
7 Brian
I sorteded them by doing
df1 = df1.sort_values(by=['ID'])
df2 = df2.sort_values(by=['ID'])
to get
df1
ID Name
2 Joe
3 Frank
7 Stacy
15 Max
df2
ID Name
2 Abigail
3 Josh
7 Brian
15 Jake
However when I check that the 'ID' column is the same across both dataframes by doing
print(df1['ID'].equals(df2['ID']))
it returns False, why is this so? Is there another method I can use to return that the two columns are equal?