【发布时间】:2015-06-28 17:53:00
【问题描述】:
我想像这样将数据框写入excel:
df = DataFrame({'Frequency':lenFreq,'Fatigue Thrust [N]':meqThrust[iexcel],'Extreme Thrust [N]':extremeThrust[iexcel],'Extreme Thrust DMR [N]':extremeThrustDMR[iexcel],\
'Fatigue Yaw [Nm]':meqYaw[iexcel],'Extreme Yaw [Nm]':extremeYaw[iexcel],'Extreme Flapwise [Nm]':extremeFlapwise[iexcel][ilenFreq]})
df.to_excel(workbookOutput, sheet_name='Results', index=False)
但每次打开文件时,我都需要扩展列:
我想知道在写入 Excel 时自动扩展列的选项。谢谢
【问题讨论】:
-
熊猫开发ruled this out of scope。您可能会在这些答案中找到一些方向stackoverflow.com/questions/6929115
-
相关的,如果不是完全重复的话:stackoverflow.com/questions/17326973/…(这甚至在 @JohnGalt 链接的 Pandas 问题跟踪线程中提到)。
标签: python python-2.7 pandas dataframe