imputation

mastml.data_cleaner.imputation(df, strategy, cols_to_leave_out=None)[source]

Method that imputes values to the missing places based on the median, mean, etc. of the data in the column

Args:
df: (dataframe), pandas dataframe containing data strategy: (str), method of imputation, e.g. median, mean, etc. cols_to_leave_out: (list), list of column indices to not include in imputation
Returns:
df: (dataframe): dataframe with NaN or missing values resolved via imputation