1
我有這樣打印一個熊貓數據幀到一個文本文件(Python 3中)
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
我怎樣才能打印出整個d F?
謝謝安迪! – user3682157 2014-09-25 02:19:18