Skip to content

Commit 55e99a7

Browse files
committed
CLN:Remove unused **kwargs from user facing methods
Addresses GH18748 for user facing methods
1 parent 145c227 commit 55e99a7

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

pandas/core/groupby/groupby.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -1748,7 +1748,12 @@ def cummin(self, axis=0, **kwargs):
17481748
if axis != 0:
17491749
return self.apply(lambda x: np.minimum.accumulate(x, axis))
17501750

1751-
return self._cython_transform('cummin', numeric_only=False)
1751+
if kwargs:
1752+
numeric_only = kwargs.get('numeric_only')
1753+
else:
1754+
numeric_only = False
1755+
1756+
return self._cython_transform('cummin', numeric_only=numeric_only)
17521757

17531758
@Substitution(name='groupby')
17541759
@Appender(_doc_template)
@@ -1757,7 +1762,12 @@ def cummax(self, axis=0, **kwargs):
17571762
if axis != 0:
17581763
return self.apply(lambda x: np.maximum.accumulate(x, axis))
17591764

1760-
return self._cython_transform('cummax', numeric_only=False)
1765+
if kwargs:
1766+
numeric_only = kwargs.get('numeric_only')
1767+
else:
1768+
numeric_only = False
1769+
1770+
return self._cython_transform('cummax', numeric_only=numeric_only)
17611771

17621772
def _get_cythonized_result(self, how, grouper, aggregate=False,
17631773
cython_dtype=None, needs_values=False,

pandas/io/pytables.py

+10-7
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,9 @@ def select(self, key, where=None, start=None, stop=None, columns=None,
707707
auto_close : boolean, should automatically close the store when
708708
finished, default is False
709709
710+
kwargs
711+
Additional keyword arguments passed to Storer
712+
710713
Returns
711714
-------
712715
The selected object
@@ -718,7 +721,7 @@ def select(self, key, where=None, start=None, stop=None, columns=None,
718721

719722
# create the storer and axes
720723
where = _ensure_term(where, scope_level=1)
721-
s = self._create_storer(group)
724+
s = self._create_storer(group, **kwargs)
722725
s.infer_axes()
723726

724727
# function to call on iteration
@@ -1688,7 +1691,7 @@ def cvalues(self):
16881691
def __iter__(self):
16891692
return iter(self.values)
16901693

1691-
def maybe_set_size(self, min_itemsize=None, **kwargs):
1694+
def maybe_set_size(self, min_itemsize=None):
16921695
""" maybe set a string col itemsize:
16931696
min_itemsize can be an integer or a dict with this columns name
16941697
with an integer size """
@@ -1701,13 +1704,13 @@ def maybe_set_size(self, min_itemsize=None, **kwargs):
17011704
self.typ = _tables(
17021705
).StringCol(itemsize=min_itemsize, pos=self.pos)
17031706

1704-
def validate(self, handler, append, **kwargs):
1707+
def validate(self, handler, append):
17051708
self.validate_names()
17061709

17071710
def validate_names(self):
17081711
pass
17091712

1710-
def validate_and_set(self, handler, append, **kwargs):
1713+
def validate_and_set(self, handler, append):
17111714
self.set_table(handler.table)
17121715
self.validate_col()
17131716
self.validate_attr(append)
@@ -3465,7 +3468,7 @@ def validate_data_columns(self, data_columns, min_itemsize):
34653468
return [c for c in data_columns if c in axis_labels]
34663469

34673470
def create_axes(self, axes, obj, validate=True, nan_rep=None,
3468-
data_columns=None, min_itemsize=None, **kwargs):
3471+
data_columns=None, min_itemsize=None):
34693472
""" create and return the axes
34703473
leagcy tables create an indexable column, indexable index,
34713474
non-indexable fields
@@ -3786,7 +3789,7 @@ def read_coordinates(self, where=None, start=None, stop=None, **kwargs):
37863789

37873790
return Index(coords)
37883791

3789-
def read_column(self, column, where=None, start=None, stop=None, **kwargs):
3792+
def read_column(self, column, where=None, start=None, stop=None):
37903793
"""return a single column from the table, generally only indexables
37913794
are interesting
37923795
"""
@@ -4741,7 +4744,7 @@ class Selection(object):
47414744
47424745
"""
47434746

4744-
def __init__(self, table, where=None, start=None, stop=None, **kwargs):
4747+
def __init__(self, table, where=None, start=None, stop=None):
47454748
self.table = table
47464749
self.where = where
47474750
self.start = start

0 commit comments

Comments
 (0)