From 0ff16b3ccdceedbd3bc4c7863b038647cf6c5ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Fri, 29 Nov 2024 13:37:32 +0100 Subject: [PATCH] Pandas --- README.md | 1 + index.html | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 084082c..3902412 100644 --- a/README.md +++ b/README.md @@ -3375,6 +3375,7 @@ c 6 7 ```python = .groupby(col_key/s) # Splits DF into groups based on passed column. = .apply() # Maps each group. Func can return DF, S or el. + = .filter() # Drops a group if function returns False. = .get_group() # Selects a group by grouping column's value. = .size() # S of group sizes. Same keys as get_group(). = [col_key] # Single column GB. All operations return S. diff --git a/index.html b/index.html index 263d07d..bf3ec8c 100644 --- a/index.html +++ b/index.html @@ -55,7 +55,7 @@
- +
@@ -2747,6 +2747,7 @@ c 6 7

GroupBy

Object that groups together rows of a dataframe based on the value of the passed column.

<GB> = <DF>.groupby(col_key/s)                 # Splits DF into groups based on passed column.
 <DF> = <GB>.apply(<func>)                      # Maps each group. Func can return DF, S or el.
+<DF> = <GB>.filter(<func>)                     # Drops a group if function returns False.
 <DF> = <GB>.get_group(<el>)                    # Selects a group by grouping column's value.
 <S>  = <GB>.size()                             # S of group sizes. Same keys as get_group().
 <GB> = <GB>[col_key]                           # Single column GB. All operations return S.
@@ -2923,7 +2924,7 @@ $ deactivate                # Deactivates the active