pandas_groupby
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
pandas_groupby [2021/07/06 23:10] – [preserve the highest odd value in each group] admin | pandas_groupby [2024/03/26 21:55] – [extract groupby object by key] raju | ||
---|---|---|---|
Line 237: | Line 237: | ||
==== extract groupby object by key ==== | ==== extract groupby object by key ==== | ||
+ | tags | pandas groupby filter a group | ||
+ | |||
* groups.get_group(key_value) if grouping on a single column | * groups.get_group(key_value) if grouping on a single column | ||
* groups.get_group(key_value_tuple) if grouping on multiple columns. | * groups.get_group(key_value_tuple) if grouping on multiple columns. | ||
Line 363: | Line 365: | ||
tags | reset_index remove level_1 column, apply function to multiple columns and rename result, groupby apply name the result, groupby apply remove level_1 | tags | reset_index remove level_1 column, apply function to multiple columns and rename result, groupby apply name the result, groupby apply remove level_1 | ||
- | |||
pandas_groupby.txt · Last modified: 2024/07/29 19:56 by raju