text_html_output_1.png
import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

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

left = data[data.left == 1]

right = data[data.left == 0]

data.shape

data.groupby('left').mean()

sub_salary = data[['satisfaction_level', 'average_montly_hours', 'promotion_last_5years', 'salary']]

sal_dummies = pd.get_dummies(sub_salary.salary, prefix='salary')

df = pd.concat([sub_salary, sal_dummies], axis='columns')

df.head()