Data Transformation, Sklearn, Machine Learning, One Hot Encoding, Label Encoding.
be one less than the number of categories [4]. pd.get_dummies(df['Marital Status'],drop_first=True).head() In the second row of the table above, we have zero for married and single, which effectively means that it is Divorced. If we assign drop_first =False, then we still have three columns: