text_html_output_1.png text_plain_output_1.png
import numpy as np

import seaborn as sns

def data_exploration(df):
    return
data_exploration(greeks)

def impute_and_replace(df):
    numerical_columns = df.select_dtypes(include=[np.number]).columns
    df[numerical_columns] = df[numerical_columns].fillna(df[numerical_columns].mean())
    categorical_column = 'EJ'
    df[categorical_column] = df[categorical_column].replace({'A': 0, 'B': 1})
    return df
train1 = impute_and_replace(train.copy())
train1.info()