I'm trying to create a new dataframe based on existing dataframe's data, I have the following data frame:
And I need to create a new dataframe which sums the amount of workers joined each department every year.
I've tried the following:
emp_dept_sal_s[['dept_name','Year']].groupby(['dept_name','Year']).count()
So basically, the question is how do I relative to both columns (dept_name and Year)? Thanks!