Pandas merge giving error "Buffer has wrong number of dimensions (expected 1, got 2)"

As mentioned in the comments, you have a dupe column:

enter image description here


To adress the issue of the dupe columns you can either drop the dupe column using duplicated with smth. like:

c = c[~c.columns.duplicated(keep='first')]

or adding an additional char to either one of the DataFrames using for example: c.columns=[c.columns[i]+str(i) for i in range(len(c.columns))]

Keep in mind that in this case you must adjust the merging part


This Will remove the duplicated columns from the Dataframe

df = df[list(df.columns[~df.columns.duplicated()])]