How can I write
df.info() to file?
df.info()
I would like to include this in a sheet of the excel file where I write my df to using df
df
I would try the following:
f = open('df.info', 'w+') df.info(buf=f) f.close()