SimpleImputer.__init__(impute_strategy='most_frequent', fill_value=None, random_seed=0, **kwargs)[source]

Initalizes an transformer that imputes missing data according to the specified imputation strategy.”

  • impute_strategy (string) – Impute strategy to use. Valid values include “mean”, “median”, “most_frequent”, “constant” for numerical data, and “most_frequent”, “constant” for object data types.

  • fill_value (string) – When impute_strategy == “constant”, fill_value is used to replace missing data. Defaults to 0 when imputing numerical data and “missing_value” for strings or object data types.

  • random_seed (int) – Seed for the random number generator. Defaults to 0.