I'm writing a summary and I need to write multiple pandas
data frames to the same txt file. .to_csv
method can only write one data frame to a file, so I tried the following code:
f = open('summary.txt', 'w')
f.write(str(df1))
f.write(str(df2))
f.write(str(df3))
f.close()
However, in the summary file, there were showed only parts of the data frames, most lines of each data frame were represented as ...
.