I have two dataframes I want to join
df1.join(df2, how = 'left', on = "foo")
I get
ValueError: You are trying to merge on object and int64 columns. If you wish to proceed you should use pd.concat
But, both columns foo are of type object.
print(df1.dtypes)
This gives me
foo object
geometry geometry
dtype: object
Looking at the dtypes of df2
print(df2.dtypes)
This gives me
foo object
bar object
num int64
dtype: object
foo is in both dataframe of type object. Even a
df1.dtypes["foo"] == df2.dtypes["foo"]
returns a True
Why do I get this error message?