text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

train = pd.read_csv('../input/tabular-playground-series-sep-2021/train.csv', index_col=0)
test = pd.read_csv('../input/tabular-playground-series-sep-2021/test.csv', index_col=0)

train_row, train_col = train.shape
test_row, test_col = test.shape

train.corr()

train.corrwith(train['claim'])

plot , ax = plt.subplots(figsize=(10,8))
sns.heatmap(train.corr())

hist = train.hist(bins = 25, figsize=(70,45))

features = train.columns.tolist()[0:-1]
target = ['claim']

train_colum_missing = train.isnull().sum()
train_row_missing = train[features].isnull().sum(axis=1)
train['no_of_missing_data'] = train_row_missing
test_colum_missing = test.isnull().sum()
test_row_missing = test[features].isnull().sum(axis=1)
test['no_of_missing_data'] = test_row_missing

print(f'Total number of missing values in training dataset---->{train_total_missing}')
print(f'Total number of missing values in testing dataset----->{test_total_missing}')
train_no_of_missing_rows = (train['no_of_missing_data'] != 0).sum()
print('\n{0:{fill}{align}80}\n'.format('Training Data', fill='=', align='^'))
print(f"Total rows -----------------------> {train_row}\nNumber of rows has missing data---> {train_no_of_missing_rows}\n{'-' * 50}\nNumber of rows has full data--------> {train_row - train_no_of_missing_rows}")
test_no_of_missing_rows = (test['no_of_missing_data'] != 0).sum()
print('\n{0:{fill}{align}80}\n'.format('Testing Data', fill='=', align='^'))
print(f"Total rows -----------------------> {test_row}\nNumber of rows has missing data---> {test_no_of_missing_rows}\n{'-' * 50}\nNumber of rows has full data--------> {test_row - test_no_of_missing_rows}")