Dataframe add prefix to certain columns on fly while importing

Viewed 23

I am importing an excel sheet that has two header rows: first row is a common name and second row is column names. I want to prefix each column by the row1 common name.

enter image description here

My code:

df = pd.read_excel('example.xlsx', skiprows=None)

Expected output:

df.columns = 

['Other Standard_SAIDI With MED', ...]
0 Answers
Related