我正在尝试将数据框的形状打印到excel文件中。你知道吗
以下是我迄今为止所取得的成就:
file_shape = df.shape[0] <<-- This saves the count of rows to a variable
writer = pd.ExcelWriter(output, engine='xlsxwriter')
file_shape.to_excel(writer, startrow=0, merge_cells=False, sheet_name="Summary", index=False)
上面的抛出一个错误
AttributeError: 'int' object has no attribute 'to_excel'
请尝试以下操作:
相关问题 更多 >
编程相关推荐