1

While reading a csv file into pandas dataframe, I came into following situation: The column names were spread into multiple rows. I have attached a picture below. The problem is that now I have some columns to have duplicated name, but they are not. Is there a way to combine the columns from multiple row in single columns, without doing manual hack? Well the data points are not duplicated, but it misses some string from the column names, resulting into columns that may appear as repeated.

data = pd.read_csv("CO2.csv", header=54)

enter image description here

Thanks in advance

stackword_0
  • 185
  • 8

0 Answers0