text_plain_output_2.png application_vnd.jupyter.stderr_output_1.png
import pandas as pd

import pandas as pd
df = pd.read_csv('../input/HR_comma_sep.csv')

sales_salary = pd.crosstab(df['sales'], df['salary'], normalize=False)
sales_salary = sales_salary[['low', 'medium', 'high']]
sales_salary['temp'] = sales_salary.index.values
sales_salary.iloc[0, 3] = 'it'
sales_salary.iloc[1, 3] = 'rand_d'
sales_salary.sort_values(by='temp', inplace=True)
sales_salary.set_index('temp', inplace=True)
sales_salary.index.name = 'sales'
sales_salary