text_html_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

train_df = pd.read_csv('/kaggle/input/insurance-churn-prediction-weekend-hackathon/Insurance_Churn_ParticipantsData/Train.csv')
test_df = pd.read_csv('/kaggle/input/insurance-churn-prediction-weekend-hackathon/Insurance_Churn_ParticipantsData/Test.csv')

train_df.rename(columns={'labels': 'churn'}, inplace=True)

train_df.describe().T

def summary(df):
    Types = df.dtypes
    Counts = df.apply(lambda x: x.count())
    Uniques = df.apply(lambda x: x.unique().shape[0])
    cols = ['Types', 'Counts', 'Uniques']
    str = pd.concat([Types, Counts, Uniques], axis=1, sort=True)
    str.columns = cols
    display(str.sort_values(by='Uniques', ascending=False))
    print('__________Data Types__________\n')
    print(str.Types.value_counts())
summary(df=train_df)