from sklearn.impute import SimpleImputer imputer = SimpleImputer(strategy=\'most_frequent\') titanic_df[\'age\'] = imputer.fit_transform(titanic_df[[\'age\']]) titanic_