In case it helps, I have also hit this error when I tried to concatenate two data frames (and as of the time of writing this is the only related hit I can find on google other than the source code).
I don’t know whether this answer would have solved the OP’s problem (since he/she didn’t post enough information), but for me, this was caused when I tried to concat
dataframe df1
with columns ['A', 'B', 'B', 'C']
(see the duplicate column headings?) with dataframe df2
with columns ['A', 'B']
. Understandably the duplication caused pandas to throw a wobbly. Change df1
to ['A', 'B', 'C']
(i.e. drop one of the duplicate columns) and everything works fine.