text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

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

import seaborn as sns

train_data = pd.read_csv('../input/30-days-of-ml/train.csv')
test_data = pd.read_csv('../input/30-days-of-ml/test.csv')
sample = pd.read_csv('../input/30-days-of-ml/sample_submission.csv', index_col='id')

cat_features = [feature for feature in train_data.columns if 'cat' in feature]
cont_features = [feature for feature in train_data.columns if 'cont' in feature]

plt.figure(figsize=(20,10))
ax= sns.violinplot(data=train_data[cont_features],inner=None, palette="viridis")
plt.title('Continuous features distribution');

train_data.var()

train_data.std()

cat= train_data.select_dtypes(include='object').columns.tolist()
idx = 0
f, axes = plt.subplots(5, 2, sharex=True, figsize=(12,14))
plt.suptitle('Categorical features distribution', size=16, y=(0.94))
for row in range(5):
    for col in range(2):
        data = train_data[cat[idx]].value_counts()
        sns.barplot(x = data.index, y = data.values, palette='viridis', ax=axes[row, col])
        axes[row,col].set_title(cat[idx])
        idx += 1

corrMatrix = train_data.corr(method='pearson', min_periods=1)
corrMatrix