this is my first public question here because I am absolutely lost in this case...
I have an excel file that looks like this:

I applied the following commands to transform the excel file into a dataframe:
df = pd.ExcelFile(r'file_path/excel_file.xlsx')
df = df.parse(sheet_name, header = [0, 1, 2])
Now the problem is that the empty header spaces (in the 'Name', 'ID' and 'Test mode' columns) are being filled with 'Unnamed: 0_level_1' and 'Unnamed: 1_level_1' in the first row and 'Unnamed: 0_level_2' and 'Unnamed: 1_level_2' and 'Unnamed: 2_level_2' in the second row.
How can I merge these rows together for every header column so that it just says 'Name', 'ID' and 'Test mode' under the condition that I don't have the opportunity to edit the excel file? So basically I want to merge all header rows where this happens.

Can anyone help me?
Thanks for the help!
df.iloc[0:2] = df.iloc[0:2].fillna(method='ffill', axis=1)the program fills all these empty spaces with the previous entry, which I don't want. I tried filling the empty spaces with'', inplace = Truebut that makes the values in the subcolumns inaccessible...ID = df['ID']orTest_mode = df[('Preconditions', 'Test mode')]orCurrent = df[('Preconditions', 'Electronic Load', 'Current')]@not_speshal this indexing works when I use the 'ffill' method but like I said it gives me unwanted header descriptions...Multilevel Column Indexpandas.pydata.org/pandas-docs/stable/user_guide/advanced.html. You can remove the index during the parse phase and add right name or starting from your df you could flatten the column index. maybeto_flat_index()useful