Missing values for categorical data transformation

The techniques to assess the missing values remain the same for categorical variables as well. However, some of the imputation techniques are different, and some methods are similar to the numerical missing value treatment methods that were discussed. We will demonstrate the Python code for the techniques that are specific to only categorical missing value treatment:

  • Remove or delete the data: The process to decide whether to remove the data points that are missing for categorical variables remains the same as we discussed for numerical missing value treatment.
  • Replace missing values with the mode: As categorical data is non-parametric, unlike numerical data they don't have a mean or median. ...

Get Hands-On Automated Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.