I have two dataframe as shown below.
df1:
Date t_factor plan plan_score 0 2020-02-01 5 NaN 0 1 2020-02
For me working specify excel file like:
import os def save_xls(list_dfs, xls_path): with pd.ExcelWriter(xls_path) as writer: for n, df in enumerate(list_dfs): df.to_excel(writer,'sheet%s' % n) writer.save() save_xls([df1, df2], 'file.xlsx')