Hi there I have read a csv file using pd.read_csv()
I am trying to clean up this data but it is proving a bit difficult.
Essentially all of the information is in a single column and row 1 and I need to split the data in the first row into column headings like Country, YEAR, nace, KEY_E, KEY_L, etc.
Here is a look of the data in raw format
raw excel format
This is the code I have so far also trying to do this:
df = pd.read_csv(r"C:UsersblakecarPycharmProjectsSES DataSES_BE_2002_ANONYM_CD.csv")
row_data = df.iloc[0]
row_df = pd.DataFrame(row_data).transpose()
row_df.to_csv('split_row.csv', index=False)
This is what I would like my desired output to look like
Desired output