title: Python- Import Multiple Files to a single .csv file
body: <p>I have 125 data files containing two columns and 21 rows of data and I'd like to import them into a single .csv file (as 125 pairs of columns and only 21 rows).
  This is what my data files look like:</p>
  
  <p><img src="https://i.stack.imgur.com/BAXMY.png" alt="enter image description here"></p>
  
  <p>I am fairly new to python but I have come up with the following code:</p>
  
  <pre><code>import glob
  Results = glob.glob('./*.data')
  fout='c:/Results/res.csv'
  fout=open ("res.csv", 'w')
   for file in Results:
   g = open( file, "r" )
   fout.write(g.read())
   g.close() 
  fout.close()
  </code></pre>
  
  <p>The problem with the above code is that all the data are copied into only two columns with 125*21 rows.</p>
  
  <p>Any help is very much appreciated!</p>