title: Print A Pandas Data Frame to a Text File (Python 3)
body: <p>I have a large data file like this</p>
  
  <pre><code> Words
   One
   Two
   Three
   ....
   Threethousand
  </code></pre>
  
  <p>I am trying to print this list to a text file with this code:</p>
  
  <pre><code> df1 = df[['Words']]
   with open('atextfile.txt', 'w', encoding='utf-8') as outfile:
           print(df1, file=outfile)
  </code></pre>
  
  <p>But what happens is that it doesn't print out the whole DF, it ends up looking like this:</p>
  
  <pre><code> Words
   One
   Two
   Three
   ....
   Threethousand
   Fourthousand
   Fivethousand
  </code></pre>
  
  <p>How can I print out the whole DF?</p>