text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

import mglearn

import pandas

import seaborn

import seaborn
import matplotlib.pyplot as plt
import pandas
df_pandas = pandas.read_csv('../input/voicegender/voice.csv')

male = df_pandas.loc[df_pandas['label'] == 'male']
female = df_pandas.loc[df_pandas['label'] == 'female']
fig, axes = plt.subplots(10, 2, figsize=(10, 20))
ax = axes.ravel()
for i in range(20):
    ax[i].hist(male.iloc[:, i], bins=20, color=mglearn.cm3(0), alpha=0.5)
    ax[i].hist(female.iloc[:, i], bins=20, color=mglearn.cm3(2), alpha=0.5)
    ax[i].set_title(list(male)[i])
    ax[i].set_yticks(())
    ax[i].set_xlabel('Feature magnitude')
    ax[i].set_ylabel('Frequency')
    ax[i].legend(['male', 'female'], loc='best')
fig.tight_layout()