Skip to content

Instantly share code, notes, and snippets.

@parulnith
Last active August 9, 2021 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parulnith/5e3b103676f6b0dbc331d1264fc3d6e1 to your computer and use it in GitHub Desktop.
Save parulnith/5e3b103676f6b0dbc331d1264fc3d6e1 to your computer and use it in GitHub Desktop.
#Filtering salaryand experience details of only Software Engineers
se = df[df['Position '] == 'Software Engineer']
se.rename(columns = {'Yearly brutto salary (without bonus and stocks) in EUR': 'Salary'}, inplace=True)
salary_exp = se.groupby(['Total years of experience'])['Salary'].median().to_frame().reset_index()
salary_exp[['Total years of experience','Salary']] = salary_exp[['Total years of experience','Salary']].astype(int)
salary_exp.sort_values('Total years of experience',inplace=True)
salary_exp[:5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment