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

corr_left = pd.DataFrame(corr['left'].drop('left'))
corr_left.sort_values(by='left', ascending=False)

data['avg_hour_project'] = data['average_montly_hours'] * 12 / data['number_project']
data['avg_hour_project_range'] = pd.cut(data['avg_hour_project'], 3)
data[['avg_hour_project_range', 'left']].groupby(['avg_hour_project_range']).mean()