Tuesday, 15 April 2014

python - Assigning One Name to multiple DataFrame Columns -


I am working with feature vectors in machine learning which is different in length; There are some scalers, the other vectors, I represent a feature vector in the form of the entire row in the Panda Dataframe object. Suppose I have some dataframe that I created using:

  Feature_Matrix = pd.DataFrame (data, column = ['feat1', 'feat2' ..., 'featN '])  

Now suppose that' fat1 'matches some scalar C and there is a vector with' Feet 2 'value [M, N], how do I get it I can call like

  Feature_Matrix  

gives some sort of array in the following types:

  'feat1 ',' Feat2 'image 1 [C1, M1, N1, ....] Image 2 [C2, M2, N2, ....] ...  

Mu It needs that if I am an index in Feature_Matrix:

Feature_Matrix ['feat2']

Then this returns

 < Code> image 1 [[M1, N1], image 2 [M2, N2], ...]]  


No comments:

Post a Comment