title: Python, Pandas : write content of DataFrame into text File
body: <p>I have pandas DataFrame like this</p>
  <pre><code>        X    Y  Z    Value 
  0      18   55  1      70   
  1      18   55  2      67 
  2      18   57  2      75     
  3      18   58  1      35  
  4      19   54  2      70   
  </code></pre>
  <p>I want to write this data to a text file that looks like this:</p>
  <pre><code>18 55 1 70   
  18 55 2 67 
  18 57 2 75     
  18 58 1 35  
  19 54 2 70 
  </code></pre>
  <p>I have tried something like</p>
  <pre><code>f = open(writePath, 'a')
  f.writelines(['\n', str(data['X']), ' ', str(data['Y']), ' ', str(data['Z']), ' ', str(data['Value'])])
  f.close()
  </code></pre>
  <p>It's not correct. How to do this?</p>