Extracting data from multiple files
<p>I'm using python (specifically numpy, scipy, and matplotlib) to read in data from multiple files. Specifically I'm trying to extract Z values 9 different point cloud datasets (.ply format: X,Y,Z,R,G,B).</p>

<p>With the extracted Z (or height values), I'm trying to make a relative frequency histogram of height, with mean relative frequency, standard deviation, and confidence intervals for each bin from the 9 files.</p>

<p>I have a working code doing this for a singular file, but am having difficulty trying to scale it to work with 9 files. I could simply brute force with many lines of redundant code, but I'm trying to be a little bit more efficient than that.</p>

<p>I have some code to the effect of:</p>

<pre><code>filelist = os.listdir('path to 9 ply files')
   for files in filelist:
   CAM_XYZ = loadtxt(files,skiprows = 14, usecols = (0,1,2))
   CAMt    = transpose(CAM_XYZ)
   CAM_Z   = CAMt[2]
</code></pre>

<p>I would like to extract the Z values/column from each file, and then attach them to another array. Ideally this final array would have 9 columns with Z values from each file. I'm just stuck on how I would actually do this, the way my current code is setup it just overwrites values.</p>

<p>Any suggestions/places to look would  be greatly appreciated.</p>
