写入函数为pd.DataFrame.to_excel();必须是DataFrame写入excel, 即Write DataFrame to an excel sheet。
to_excel(self, excel_writer, sheet_name='Sheet1', na_rep='', float_format=None,columns=None,
header=True, index=True, index_label=None,startrow=0, startcol=0, engine=None,
merge_cells=True, encoding=None,inf_rep='inf', verbose=True, freeze_panes=None)
常用参数解析
excel_writer :ExcelWriter目标路径
In [16]: df = pd.read_csv('test.csv')
In [17]: df
Out[17]:
index a_name b_name
0 0 1 3
1