text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

train = pd.read_csv('../input/30-days-of-ml/train.csv')
test = pd.read_csv('../input/30-days-of-ml/test.csv')
submission = pd.read_csv('../input/30-days-of-ml/sample_submission.csv')

(train.shape, test.shape, submission.shape)

train.drop('id', axis=1, inplace=True)
test.drop('id', axis=1, inplace=True)

train.nunique()

fig, axes =plt.subplots(5,2, figsize=(15,15), sharex=True)
axes = axes.flatten()
object_bol = train.dtypes == 'object'
for ax, catplot in zip(axes, train.dtypes[object_bol].index):
    sns.countplot(y=catplot, data=train, ax=ax)
plt.tight_layout()     
plt.show()

fig = plt.figure(figsize = (15, 60))
for i in range(len(train.columns.tolist()[10:24])):
    plt.subplot(20,5,i+1)
    sns.set_style("white")
    plt.title(train.columns.tolist()[10:24][i], size = 12, fontname = 'monospace')
    a = sns.kdeplot(train[train.columns.tolist()[10:24][i]], shade = True, alpha = 0.9, linewidth = 1.5, facecolor=(1, 1, 1, 0), edgecolor=".2")
    plt.ylabel('')
    plt.xlabel('')
    plt.xticks(fontname = 'monospace')
    plt.yticks([])
    for j in ['right', 'left', 'top']:
        a.spines[j].set_visible(False)
        a.spines['bottom'].set_linewidth(1.2)
        
fig.tight_layout(h_pad = 3)
plt.show()

fig = plt.figure(figsize=(15, 60))
for i in range(len(train.columns.tolist()[10:24])):
    plt.subplot(20, 5, i + 1)
    sns.set_style('white')
    plt.title(train.columns.tolist()[10:24][i], size=12, fontname='monospace')
    a = sns.boxplot(train[train.columns.tolist()[10:24][i]], linewidth=2.5, color='white')
    plt.ylabel('')
    plt.xlabel('')
    plt.xticks(fontname='monospace')
    plt.yticks([])
    for j in ['right', 'left', 'top']:
        a.spines[j].set_visible(False)
        a.spines['bottom'].set_linewidth(1.2)
fig.tight_layout(h_pad=3)
plt.show()