Use pandas (and glob?) to merge numerous (csv) data text files from a directory
<p>I have numerous separate instrument files of X, Y (integer) column data. All arrays are the same dimension. The X column is the same for each file, the Y column numbers are different.  If possible, I want to concatenate the Y columns of the successive files to the first file and write a new single large array containing the first X and multiple Ys? Like this:</p>
<p><code>file1=X1 Y1 file2=X1 Y2 file3=X1 Y3...</code> new file result should be: <code>X1 Y1 Y2 Y3...</code></p>
<p>Been looking at variations on:</p>
<pre class="lang-py prettyprint-override"><code>import pandas
data = pandas.read_csv('file1.csv') 
# print(data) returns the 1st file array ok
</code></pre>
<p>Need to open and loop over successive files to join Y column to file1.</p>