text_html_output_1.png
import pandas as pd

import seaborn as sns

data = pd.read_csv('../input/HR_comma_sep.csv')

corr = data.corr()
corr = corr
corr

data.loc[data['avg_hour_project'] <= 749.333, 'avg_hour_project'] = 0
data.loc[(data['avg_hour_project'] > 749.333) & (data['avg_hour_project'] <= 1304.667), 'avg_hour_project'] = 1
data.loc[(data['avg_hour_project'] > 1304.667) & (data['avg_hour_project'] <= 1860.0), 'avg_hour_project'] = 2
data.drop(['avg_hour_project_range'], axis=1, inplace=True)

g = sns.FacetGrid(data, col='left')
g.map(sns.boxplot, 'time_spend_company')

dropdata = data[data['time_spend_company'] >= 8]
data.drop(dropdata.index, inplace=True)

sns.barplot(x='time_spend_company', y='left', hue='salary', data=data)