Skip to content Skip to sidebar Skip to footer

In Pandas, A Duplicate Column Is Appearing With ".1" Appended To Name

With the following code for a .xlsx file with a Multiindex in the columns: import pandas as pd df = pd.read_excel('Total Data.xlsx', header=[0,1], sheet_name='Control (E)') c = d

Solution 1:

You most likely have the same column name twice in your excel sheet.

All keys must be unique, which is why Pandas is appending a ".1" to the end of the second occurrence of a duplicate column name.

Post a Comment for "In Pandas, A Duplicate Column Is Appearing With ".1" Appended To Name"