【发布时间】:2014-09-24 22:57:02
【问题描述】:
我有一个像这样的大数据文件
Words
One
Two
Three
....
Threethousand
我正在尝试使用以下代码将此列表打印到文本文件:
df1 = df[['Words']]
with open('atextfile.txt', 'w', encoding='utf-8') as outfile:
print(df1, file=outfile)
但是发生的情况是它没有打印出整个 DF,它最终看起来像这样:
Words
One
Two
Three
....
Threethousand
Fourthousand
Fivethousand
如何打印出整个 DF?
【问题讨论】:
标签: python-3.x pandas