image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

hr_attrition = pd.read_csv('../input/WA_Fn-UseC_-HR-Employee-Attrition.csv', header=0)
hr_attrition.columns.values

def draw_subplots(var_Name, tittle_Name, nrow=1, ncol=1, idx=1, fz=10):
    ax = plt.subplot(nrow, ncol, idx)
    ax.set_title('Distribution of ' + var_Name)
    plt.suptitle(tittle_Name, fontsize=fz)
numeric_columns = ['Age', 'MonthlyIncome', 'TotalWorkingYears']
fig, ax = plt.subplots(1, 1, figsize=(10, 10))
j = 0
title_Str = 'Plotting the density distribution of various numeric Features'
for i in numeric_columns:
    j += 1
    draw_subplots(i, title_Str, 3, 1, j, 20)
    sns.distplot(hr_attrition[i])
    plt.xlabel('')