title: how can i transformed descriptors mean centered and scaled to unit variance prior to Machine learning modeling using python and pandas
body: <p>How can I transform the given data set as  mean centred and scaled to unit variance using pandas or numpy or any appropriate python module, data also contain some missing values as "Nan" that should also be removed prior to modelling task pleas help .</p>
  
  <p>thanks </p>
  
  <p>Ex. data set. </p>
  
  <pre><code>GA_ID   PN_ID   PC_ID   MBP_ID  GR_ID   AP_ID   class
  0.033   6.652   6.681   0.194   0.874   3.177     0
  0.034   9.039   6.224   0.194   1.137   Nan       0
  0.035   10.936  10.304  1.015   0.911   4.9       1
  0.022   10.11   9.603   1.374   0.848   4.566     1
  0.035   2.963   17.156  0.599   0.823   9.406     1
  0.033   10.872  10.244  1.015   0.574   4.871     1
  0.035   21.694  22.389  1.015   0.859   9.259     1
  0.035   10.936  10.304  1.015   0.911   Nan       1
  0.035   10.936  10.304  1.015   0.911   4.9       1
  0.035   10.936  10.304  1.015   0.911   4.9       0
  0.036   1.373   12.034  0.35    0.259   5.723     0
  0.033   9.831   9.338   0.35    0.919   4.44      0
  </code></pre>
  
  <p>I have used: </p>
  
  <pre><code>from sklearn import preprocessing
  import numpy as np
  raw_data = open("/home/zebrafish/Desktop/scklearn/data.csv")
  dataset = np.loadtxt(raw_data, delimiter=",")
  X = dataset[:,0:5]
  y = dataset[:,6]
  X_pro = preprocessing.scale(X)
  </code></pre>
  
  <p>but I am not sure wither this method is current or and would it ignore the "Nan" or it will  automatically take appropriate steps for "Nan" because in original data there was no "Nan" value but to understand the solution if it occurs I have incorporated "Nan"manually at two positions.   </p>
  
  <p>thanks</p>
  
  <hr>
  
  <pre><code>                   Question Update 
  </code></pre>
  
  <hr>
  
  <p>With some googling and playing around the data probably i found that   this method may normalizing data on Row basis and I want to normalize data with column basis.  </p>
  
  <p>So what would be the appropriate method for column basis normalization.  </p>
  
  <p>thanks </p>