python - Assigning One Name to multiple DataFrame Columns -


i'm working feature vectors in machine learning vary in length; scalars, others vectors. represent 1 feature vector entire row in pandas dataframe object. suppose have dataframe created using:

feature_matrix = pd.dataframe(data,columns=['feat1','feat2'...,'featn']) 

now suppose 'feat1' corresponded scalar c , 'feat2' vector values [m,n] , how can have such calling

feature_matrix 

returns sort of array in following form:

         'feat1',        'feat2'  image 1 [  c1   ,    m1    ,   n1   , ....]  image 2 [  c2   ,    m2    ,   n2   , ....]          ... 

i need such if index feature_matrix such:

feature_matrix['feat2'] 

then returns

image 1 [[m1,n1], image 2  [m2,n2],          ...]] 


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -