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

employees = pd.read_csv('/kaggle/input/ibm-hr-analytics-attrition-dataset/WA_Fn-UseC_-HR-Employee-Attrition.csv')

employees.set_index('Attrition')
employees
employees = employees.set_index('Attrition')
employees

employees = employees.reset_index()

employees.shape

employees.iloc[0:3, 0:4]

employees[employees.Attrition == 'No']

employees_attrition = employees[employees.DistanceFromHome <= 10.632911]
employees_attrition.groupby('Attrition').Attrition.size()['No'] / employees.groupby('Attrition').Attrition.size()['No']