I have a data set like this .
Sector Salary Paid Employer Job Title
College $105,595.39 Algonquin College Professor
university $208,456,897, harvard university Professor
College $200,000,000 csi College Professor
university $50,000, ISU university Professor
College $60,000.39 Algonquin College Professor
university $258,645,789, ALU university Professor
I am trying to groupby based in the seector i.e. college or universityI have grouped by by like
universities = df[ df['Employer'].str.contains('Univ',regex=True) ]
university_group= universities.groupby('Employer').
After this i try to find the average of every individual university
average_salary_university=university_group['Salary ($)'].agg(np.mean)
This give the individual average salary of university. I am trying to find the lowest and highest average salary of a university from a list. and For each, how many employees do they have making over $100,000CAN?
I try to this
minimum= (average_salary_university).values.argmax()
df[df[minimum]]
But it is not working. Can somebody help me please