Group-by in Pandas is widely used, and since Pandas is heavily using Index, it may be not very convenient to directly "chain" the group-by statement with downstream analytics statement (especially if one need to aggregate multiple statistics for the same column. Here is a demo To avoid this "friction", a nicer approach (for people not familiar using index, including me) is following approach. This would make the group-by statement in Pandas index-free (good for index-frustrated users :) ).
The original discussion was on Github: https://github.com/pandas-dev/pandas/issues/14581
0 Comments
Leave a Reply. |
AuthorData Magician Archives
October 2017
Categories
All
|