text_html_output_1.png
from termcolor import colored

import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

train = pd.read_csv('../input/30-days-of-ml/train.csv', index_col=0)
test = pd.read_csv('../input/30-days-of-ml/test.csv', index_col=0)

train.isnull().sum()

features = train.drop(['target'], axis=1)

num_col = list(train.select_dtypes(include='float64').columns)
cat_cols = list(train.select_dtypes(include='object').columns)
num_col.remove('target')

fig = plt.figure(figsize=(10, 5))
sns.barplot(y=train[cat_cols].nunique().values, x=train[cat_cols].nunique().index, color='blue', alpha=0.5)
plt.xticks(rotation=0)
plt.title('Number of categorical unique values', fontsize=16)