I have two dataframes with the same dtypes:
>>> df1.dtypes
Out[3]:
GUID object
RID int64
SID int64
Threshold float64
Average float64
dtype: object
>>> df2.dtypes
Out[4]:
GUID object
RID int64
SID int64
Threshold float64
Average float64
dtype: object
When running
df1.append(df2)
or
pd.concat([df1,df2])
I'm getting the following error:
in get_empty_dtype_and_na
raise AssertionError("invalid dtype determination in get_concat_dtype")
Any idea what am I missing?
Problem was MultiIndex
Using droplevel fixed the issue.
Very confusing error message.
df1.columns.droplevel(1)
df1.append(df2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With