I am trying to encode the mushroom dataset here (https://www.kaggle.com/uciml/mushroom-classification) using One-Hot Encoding. Here is the code that I used (in Python) for the encoding:
from sklearn.preprocessing import OneHotEncoder
second_df = OneHotEncoder(handle_unknown='ignore').fit_transform(new_df)
print(second_df)
The result for my code is in this image, and that makes me quite confusing: Result for the encoding.
Is this result the right representation for my One-Hot Encoding? If not, what shall I do to fix the code?