how to save output from dataframe info to file a excel or text file

后端 未结 1 1247
自闭症患者
自闭症患者 2020-12-21 12:23

How can I write

df.info() to file?

I would like to include this in a sheet of the excel file where I write my df to using df

相关标签:
1条回答
  • 2020-12-21 13:04

    I would try the following:

    f = open('df.info', 'w+')
    
    df.info(buf=f)
    
    f.close()
    
    0 讨论(0)
提交回复
热议问题