I currently have a dataframe that looks like this:
| Unnamed:1|Unnamed:2 |Unnamed:3 |
| Column 1 | Column 2 | Column 3 |
0 | Data | Data | Data |
1 | Data | Data | Data |
2 | Data | Data | Data |
3 | Data | Data | Data |
I've been using the following code unsuccessfully as it replaces the header with the index [0] row:
new_header = df.iloc[0]
df = df[1:]
df.columns = new_header
Ideally the new dataframe would look like:
| Column 1 | Column 2 | Column 3 |
0 | Data | Data | Data |
1 | Data | Data | Data |
2 | Data | Data | Data |
3 | Data | Data | Data |