Reading an array in part from a file using Python
Question: I have a file that looks like this:

    
    
      C     0.210991841737     0.047663662717     0.483960886619
      C    -0.960965312103     0.688519555303    -0.115848688934
      C     1.558206749694     0.047460114159    -0.180267436891
      O    -0.815251456906    -0.734986972268    -0.138532905591
      H     0.223550547304    -0.045637654519     1.567373484970
      H    -1.759483315918     1.063259112311     0.516330435381
      H    -0.862256972568     1.177986074652    -1.079897880020
      H     2.088617117792    -0.883541600456     0.026321487274
      H     2.169362364888     0.872235726981     0.192209317060
      H     1.455347299576     0.149768052462    -1.260354487995
    

I need to read the numbers only and store it in a 10x3 matrix. How do I do
this in python??


Answer: You could use [`pandas`](http://pandas.pydata.org/) to do this:

    
    
    In [1]: import pandas as pd
    
    In [2]: df = pd.read_csv(file_name, sep='\s+', header=None)
    
    In [3]: df
    Out[3]:
       0         1         2         3
    0  C  0.210992  0.047664  0.483961
    1  C -0.960965  0.688520 -0.115849
    2  C  1.558207  0.047460 -0.180267
    3  O -0.815251 -0.734987 -0.138533
    4  H  0.223551 -0.045638  1.567373
    5  H -1.759483  1.063259  0.516330
    6  H -0.862257  1.177986 -1.079898
    7  H  2.088617 -0.883542  0.026321
    8  H  2.169362  0.872236  0.192209
    9  H  1.455347  0.149768 -1.260354
    

