Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
petulla
· 11y ago · 0 comments
What are the advantages over groupby?
Comments
[–]
rrrrtttt
11y ago
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.
[–]
chris1610
11y ago
I think it ultimately is just a simpler wrapper around groupby once you start trying to do multiple levels of analysis.
[–]
mrits
11y ago
it seems like "columns" would be analogous to multiple "sum(CASE WHEN 'val' ELSE 0) as col" SQL idioms.