title: Pandas converting Text file to CSV
body: <p>I need to convert a text file to CSV. Please see my code below. My text file contains 5 columns separated by unequal spaces. When I converted this to a CSV file, all these 5 columns are coming in a single column in the Excel file.</p>
  <p>Code:</p>
  <pre><code>import pandas as pd   
   
  dataframe1 = pd.read_csv(&quot;C:\HARI_BKUP\PYTHON_SELF_Learning\Funct_Noise_Corners_2p0_A.txt&quot;,) 
    
  dataframe1.to_csv('FF.csv', index = None)
  </code></pre>
  <p>I need a CSV file with each separate column. May I know where I went wrong?</p>
  <p>TEXT FILE</p>
  <p><a href="https://i.stack.imgur.com/fyUgi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fyUgi.png" alt="enter image description here" /></a></p>
  <p>Output after running the code</p>
  <pre><code>dataframe1 = pd.read_csv(&quot;C:\HARI_BKUP\PYTHON _SELF Learning\Funct_Noise_Corners_2p0_A.txt&quot;, sep=&quot;\t&quot;)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/4KNSm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4KNSm.png" alt="enter image description here" /></a></p>