Skip to content

Commit

Permalink
Remove kwargs in catergorical.min and max
Browse files Browse the repository at this point in the history
  • Loading branch information
makbigc committed Nov 26, 2019
1 parent ac89bcd commit ce7f0da
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,7 @@ def _reduce(self, name, axis=0, **kwargs):
return func(**kwargs)

@deprecate_kwarg(old_arg_name="numeric_only", new_arg_name="skipna")
def min(self, skipna=True, **kwargs):
def min(self, skipna=True):
"""
The minimum value of the object.
Expand All @@ -2196,15 +2196,15 @@ def min(self, skipna=True, **kwargs):
good = self._codes != -1
if not good.all():
if skipna:
pointer = self._codes[good].min(**kwargs)
pointer = self._codes[good].min()
else:
return np.nan
else:
pointer = self._codes.min(**kwargs)
pointer = self._codes.min()
return self.categories[pointer]

@deprecate_kwarg(old_arg_name="numeric_only", new_arg_name="skipna")
def max(self, skipna=True, **kwargs):
def max(self, skipna=True):
"""
The maximum value of the object.
Expand All @@ -2223,11 +2223,11 @@ def max(self, skipna=True, **kwargs):
good = self._codes != -1
if not good.all():
if skipna:
pointer = self._codes[good].max(**kwargs)
pointer = self._codes[good].max()
else:
return np.nan
else:
pointer = self._codes.max(**kwargs)
pointer = self._codes.max()
return self.categories[pointer]

def mode(self, dropna=True):
Expand Down

0 comments on commit ce7f0da

Please sign in to comment.