Skip to content

Commit 3d1a530

Browse files
committed
CLN:Remove unused **kwargs from user facing methods
Addresses GH18748 for user facing methods
1 parent d78bd7a commit 3d1a530

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

pandas/core/groupby/groupby.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,12 @@ def cummin(self, axis=0, **kwargs):
17431743
if axis != 0:
17441744
return self.apply(lambda x: np.minimum.accumulate(x, axis))
17451745

1746-
return self._cython_transform('cummin', numeric_only=False)
1746+
if kwargs:
1747+
numeric_only = kwargs.get('numeric_only')
1748+
else:
1749+
numeric_only = False
1750+
1751+
return self._cython_transform('cummin', numeric_only=numeric_only)
17471752

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

1755-
return self._cython_transform('cummax', numeric_only=False)
1760+
if kwargs:
1761+
numeric_only = kwargs.get('numeric_only')
1762+
else:
1763+
numeric_only = False
1764+
1765+
return self._cython_transform('cummax', numeric_only=numeric_only)
17561766

17571767
def _get_cythonized_result(self, how, grouper, aggregate=False,
17581768
cython_dtype=None, needs_values=False,

pandas/io/pytables.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@ def select(self, key, where=None, start=None, stop=None, columns=None,
706706
auto_close : boolean, should automatically close the store when
707707
finished, default is False
708708
709+
kwargs
710+
Additional keyword arguments passed to Storer
711+
709712
Returns
710713
-------
711714
The selected object
@@ -717,7 +720,7 @@ def select(self, key, where=None, start=None, stop=None, columns=None,
717720

718721
# create the storer and axes
719722
where = _ensure_term(where, scope_level=1)
720-
s = self._create_storer(group)
723+
s = self._create_storer(group, **kwargs)
721724
s.infer_axes()
722725

723726
# function to call on iteration
@@ -1674,7 +1677,7 @@ def cvalues(self):
16741677
def __iter__(self):
16751678
return iter(self.values)
16761679

1677-
def maybe_set_size(self, min_itemsize=None, **kwargs):
1680+
def maybe_set_size(self, min_itemsize=None):
16781681
""" maybe set a string col itemsize:
16791682
min_itemsize can be an integer or a dict with this columns name
16801683
with an integer size """
@@ -1687,13 +1690,13 @@ def maybe_set_size(self, min_itemsize=None, **kwargs):
16871690
self.typ = _tables(
16881691
).StringCol(itemsize=min_itemsize, pos=self.pos)
16891692

1690-
def validate(self, handler, append, **kwargs):
1693+
def validate(self, handler, append):
16911694
self.validate_names()
16921695

16931696
def validate_names(self):
16941697
pass
16951698

1696-
def validate_and_set(self, handler, append, **kwargs):
1699+
def validate_and_set(self, handler, append):
16971700
self.set_table(handler.table)
16981701
self.validate_col()
16991702
self.validate_attr(append)
@@ -3451,7 +3454,7 @@ def validate_data_columns(self, data_columns, min_itemsize):
34513454
return [c for c in data_columns if c in axis_labels]
34523455

34533456
def create_axes(self, axes, obj, validate=True, nan_rep=None,
3454-
data_columns=None, min_itemsize=None, **kwargs):
3457+
data_columns=None, min_itemsize=None):
34553458
""" create and return the axes
34563459
leagcy tables create an indexable column, indexable index,
34573460
non-indexable fields
@@ -3772,7 +3775,7 @@ def read_coordinates(self, where=None, start=None, stop=None, **kwargs):
37723775

37733776
return Index(coords)
37743777

3775-
def read_column(self, column, where=None, start=None, stop=None, **kwargs):
3778+
def read_column(self, column, where=None, start=None, stop=None):
37763779
"""return a single column from the table, generally only indexables
37773780
are interesting
37783781
"""
@@ -4727,7 +4730,7 @@ class Selection(object):
47274730
47284731
"""
47294732

4730-
def __init__(self, table, where=None, start=None, stop=None, **kwargs):
4733+
def __init__(self, table, where=None, start=None, stop=None):
47314734
self.table = table
47324735
self.where = where
47334736
self.start = start

0 commit comments

Comments
 (0)