Easy way to do group by with multiple output in pandas
I am a long time SAS/SQL user and have always defaulted to using SQL for my groupbys for example to do select region ,case when age < 5 then ‘Low’ when age >= 5 and age <= 10 then ‘Middle’ else ‘High’ as duration ,sum(1) as total ,sum(profit) as profit ,sum(profit)/sum(1) as avg_profit ,max(revenue) as… Read More Easy way to do group by with multiple output in pandas