I have a list of tuples like below
mylist = {'file1': {'N': '96', 'P': '70', 'E': '109', 'T': '10'}, 'file2': {'N': '6', 'P': '90', 'E': '1309', 'T': '100'}', 'file3': {'N': '966', 'P': '370', 'E': '1409', 'T': '50'}}
If I extract it as a dataframe
df= pd.DataFrame.from_dict(mylist, orient='index')
it works fine. but when i try to write this df into an excel
df_cpu.to_excel (writer, "MY", index=True)
My excel does not have the file column.

'100'}'though if you're just looking for the column to be named in the excel file as it's the index it won't have a label by default To give it one you can do:df_cpu.to_excel (writer, "MY", index_label='file')