I am looking to utilize pandas get_dummy() functionality to encode a (quite extensive) set of categorical variables. However the data is currently in nested table format. Meaning that each row represents another variable instance for example
Instance, Cat_Col1, John1, Smith2, Jane3, JoeNow I can generate the full list of unique variables which I can use to get_dummies which represent all possible values. However transforming the nested table into a single instance row in this new format is giving me some trouble.
Any help is much appreciated Thanks
Edit: each instance should have a dummy coding result for all values of Cat_col
The idea would be the result be a single feature vector like so
Instance,Col_John,Col_Smith,Col_Jane,Col_Joe1,1,1,0,02,0,0,1,03,0,0,0,1I believe that is the correct coding, assuming we are doing 1-hot encoding