text_html_output_1.png
import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

import seaborn as sns

def summary(df):
    result = pd.DataFrame(df.dtypes, columns=['data type'])
    result['#duplicate'] = df.duplicated().sum()
    result['#missing'] = df.isnull().sum().values
    result['#unique'] = df.nunique().values
    return result

train_df = pd.read_csv('/kaggle/input/playground-series-s3e14/train.csv')
test_df = pd.read_csv('/kaggle/input/playground-series-s3e14/test.csv')

train_df.drop(['id'], axis=1, inplace=True)
test_df.drop(['id'], axis=1, inplace=True)

train_df.describe().T

# explore correlation of features
corr = train_df.corr()
mask = np.triu(corr)
ax, fig = plt.subplots(figsize = (13,13))
sns.heatmap(corr, mask = mask, annot = True, fmt=".3f")

fig, axes = plt.subplots(6, 3, figsize=(13, 13))
fig.suptitle('Histogram for all numerical variables in the dataset')
for i, col in enumerate(train_df.columns):
    ax = axes[i // 3, i % 3]
    sns.histplot(x=col, data=train_df, kde=True, ax=ax)
    ax.axvline(x=train_df[col].mean(), c='r', ls='-', lw=1)