Combine output from 2 pandas groupbys? Is it possible to combine the two lines of code below so that I have the std dev and skew in the same table?

Hi I want to know if it is possible to combine the following cells so that I can have the standard deviation and skew in one table, instead of two separate ones like below. enter image description here

Thank you!

Answer

salary.groupby('Rank').agg({'YrsSincePhd':['std','skew']})

Leave a Reply

Your email address will not be published. Required fields are marked *