I want to aggregate rows, using different conditions for two columns.
When I do df.groupby('[a]').agg('count')
, I get the output 1
When I do df.groupby('[a]').agg('mean')
, I get the output 2
Is there a way to do an aggregation that show output 1 to the column[b]
and output 2 to the column[c]
?