News for hackers. Stuff that matters.
Re:Pandas pivot table explained by petulla on Friday January 02, 2015 @10:41PM (#8829851)
What are the advantages over groupby?
Re:Pandas pivot table explained by rrrrtttt on Saturday January 03, 2015 @01:41AM (#8830102)
It takes the groups and arranges them as the columns of a table. Whereas groupby allows you to operate on this table in the vertical direction, the full pivot table allows you to also operate on it horizontally.
Re:Pandas pivot table explained by chris1610 on Friday January 02, 2015 @11:26PM (#8829920)
I think it ultimately is just a simpler wrapper around groupby once you start trying to do multiple levels of analysis.
Re:Pandas pivot table explained by mrits on Saturday January 03, 2015 @02:03PM (#8831629)
it seems like "columns" would be analogous to multiple "sum(CASE WHEN 'val' ELSE 0) as col" SQL idioms.