Comment 7 for bug 1475329

Revision history for this message
quincybatten (quincybatten) wrote :

The error usually generates when you concatenate, reindexing or resampling a DataFrame which the index has duplicate values . When you get this "cannot reindex from a duplicate axis" error, first you have to just check if there is any duplication in your DataFrame column names using the code:

df[df.index.duplicated()]

 If DataFrame has duplicate index values , then remove the duplicated index:

df= df.loc[~df.index.duplicated(), :]

http://net-informations.com/ds/err/reindex.htm