Data Transformation, Sklearn, Machine Learning, One Hot Encoding, Label Encoding.
the raw data print(X[:3, :]) # define the one hot encoding transform encoder = OneHotEncoder(sparse=False) # fit and apply the transform to the input data X_oe = encoder.fit_transform(X) # summarize the transformed data print(X_oe[:3, :]) 1- get_dummies Say you are dealing with a dataset that has