Impute categorical missing values in scikit-learn

To use mean values for numeric columns and the most frequent value for non-numeric columns you could do something like this. You could further distinguish between integers and floats. I guess it might make sense to use the median for integer columns instead. import pandas as pd import numpy as np from sklearn.base import TransformerMixin … Read more