I have two dataframes with the same headers.
When I try to concatenate (pd.concat()
) these two dfs (df1, df2), I get the error:
"InvalidIndexError: Reindexing only valid with uniquely valued Index objects"
I figured out that the problem is that there are duplicate column names within each dataframe. Example:
df1
respondent ID - Column1 - Column2 - Column3 - Column1 - Column2 - Column3
df2
respondent ID - Column1 - Column2 - Column3 - Column1 - Column2 - Column3
in theory, I just want to add the data of df2 below df1 (without the headers of df2 ofc)
How do I bypass this? Any thoughts?