Skip to content

Commit

Permalink
FEAT: Remove API layer default for groupby.get_group() (modin-project#70
Browse files Browse the repository at this point in the history
) [should upstream]
  • Loading branch information
pyrito authored Feb 22, 2023
1 parent cf4b4b0 commit 8f9608d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions modin/core/execution/client/query_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,7 @@ def forwarding_method(self, by, *args, **kwargs):
"tail",
"nth",
"ngroup",
"get_group",
"std",
"sem",
"rank",
Expand Down
9 changes: 8 additions & 1 deletion modin/pandas/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,13 @@ def var(self, ddof=1):
)

def get_group(self, name, obj=None):
return self._default_to_pandas(lambda df: df.get_group(name, obj=obj))
return self._check_index(
self._wrap_aggregation(
qc_method=type(self._query_compiler).groupby_get_group,
numeric_only=False,
agg_kwargs=dict(name=name, obj=obj),
)
)

def __len__(self):
return len(self.indices)
Expand Down Expand Up @@ -1333,6 +1339,7 @@ def nsmallest(self, n=5, keep="first"):
)
)


if IsExperimental.get():
from modin.experimental.cloud.meta_magic import make_wrapped_class

Expand Down

0 comments on commit 8f9608d

Please sign in to comment.