I have 536 files in fasta format. each file has 5000 records. I have extracted all the records from the 536 files using python. Now I have to convert this data into excel so that each file name appears as a heading in the excel and each heading has its own records
import pandas as pd
list1 = [10,20]
list2 = [40,30]
col1 = "X"
col2 = "Y"
data = pd.DataFrame({col1:list1,col2:list2})
data.to_excel('sample_data.xlsx', sheet_name='sheet1', index=False)
this can not be done manually. I need help in automating this.