categorial
train[col].value_counts()
sns.countplot(x='res', data=train)
for col in train[train.dtypes[train.dtypes == 'object'].index]:
print train[col].value_counts()
#names of all the columns
cols = train.columns
#Plot count plot for all attributes in a 29x4 grid
n_cols = 4
n_rows = 29
for i in range(n_rows):
fg, ax = plt.subplots(nrows=1, ncols=n_cols, sharey=True, figsize=(16, 10))
for j in range(n_cols):
sns.countplot(x=cols[i*n_cols+j], data=train, ax=ax[j])
网友评论