I have a training data set that has categorical features on which I use pd.get_dummies to one hot encode. This produces a data set with n features. I then train a classification mo
Solution 1:
For example ,
You have tradf with column ['A_1','A_2']
With your new df you have column['A'] but only have one category 1 , you can do
Post a Comment for "How To One Hot Encode With Pandas On A New Dataset?"