I'm working with a feature set structured like the following, which has 150 features:
-1 45:1 55:1 67:1
1 55:1 65:1 89:1
How can I use pandas to expand this data set such that it's a full matrix or array with all 150 features? In other words in the first row feature 44 is 0, so I would like to use pandas to make something like:
[-1,0,0,0,...(44th entry)0,1,...
1,0,0,0,...(54th entry)0,1,...]
Basically I assume there is a way in pandas to do this so I don't write a for loop and generate a zeros matrix and have it fill in the values. Am I seeking to do something like this : Fill a Pandas dataframe using information from another Pandas dataframe Or is there a better implementation since my problem seems less complex. Thanks as I am new to pandas.