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] [core]
  • Loading branch information
pyrito authored and vnlitvinov committed Mar 16, 2023
1 parent ba1823b commit ad85e96
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions modin/pandas/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def skew(self, *args, **kwargs):
)

def ffill(self, limit=None):
return self.fillna(limit=limit, method='ffill')
return self.fillna(limit=limit, method="ffill")

def sem(self, ddof=1):
return self._wrap_aggregation(
Expand Down Expand Up @@ -605,7 +605,7 @@ def cummin(self, axis=0, **kwargs):
)

def bfill(self, limit=None):
return self.fillna(limit=limit, method='bfill')
return self.fillna(limit=limit, method="bfill")

def idxmin(self):
return self._default_to_pandas(lambda df: df.idxmin())
Expand Down Expand Up @@ -774,7 +774,7 @@ def corrwith(self):
return self._default_to_pandas(lambda df: df.corrwith)

def pad(self, limit=None):
return self.fillna(limit=limit, method='pad')
return self.fillna(limit=limit, method="pad")

def max(self, numeric_only=False, min_count=-1):
return self._wrap_aggregation(
Expand All @@ -791,7 +791,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

0 comments on commit ad85e96

Please sign in to comment.