Skip to content

Commit 55cb46c

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

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
@@ -1742,7 +1742,12 @@ def cummin(self, axis=0, **kwargs):
17421742
if axis != 0:
17431743
return self.apply(lambda x: np.minimum.accumulate(x, axis))
17441744

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

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

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

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

pandas/io/pytables.py

Lines changed: 10 additions & 7 deletions
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
@@ -1675,7 +1678,7 @@ def cvalues(self):
16751678
def __iter__(self):
16761679
return iter(self.values)
16771680

1678-
def maybe_set_size(self, min_itemsize=None, **kwargs):
1681+
def maybe_set_size(self, min_itemsize=None):
16791682
""" maybe set a string col itemsize:
16801683
min_itemsize can be an integer or a dict with this columns name
16811684
with an integer size """
@@ -1688,13 +1691,13 @@ def maybe_set_size(self, min_itemsize=None, **kwargs):
16881691
self.typ = _tables(
16891692
).StringCol(itemsize=min_itemsize, pos=self.pos)
16901693

1691-
def validate(self, handler, append, **kwargs):
1694+
def validate(self, handler, append):
16921695
self.validate_names()
16931696

16941697
def validate_names(self):
16951698
pass
16961699

1697-
def validate_and_set(self, handler, append, **kwargs):
1700+
def validate_and_set(self, handler, append):
16981701
self.set_table(handler.table)
16991702
self.validate_col()
17001703
self.validate_attr(append)
@@ -3452,7 +3455,7 @@ def validate_data_columns(self, data_columns, min_itemsize):
34523455
return [c for c in data_columns if c in axis_labels]
34533456

34543457
def create_axes(self, axes, obj, validate=True, nan_rep=None,
3455-
data_columns=None, min_itemsize=None, **kwargs):
3458+
data_columns=None, min_itemsize=None):
34563459
""" create and return the axes
34573460
leagcy tables create an indexable column, indexable index,
34583461
non-indexable fields
@@ -3773,7 +3776,7 @@ def read_coordinates(self, where=None, start=None, stop=None, **kwargs):
37733776

37743777
return Index(coords)
37753778

3776-
def read_column(self, column, where=None, start=None, stop=None, **kwargs):
3779+
def read_column(self, column, where=None, start=None, stop=None):
37773780
"""return a single column from the table, generally only indexables
37783781
are interesting
37793782
"""
@@ -4728,7 +4731,7 @@ class Selection(object):
47284731
47294732
"""
47304733

4731-
def __init__(self, table, where=None, start=None, stop=None, **kwargs):
4734+
def __init__(self, table, where=None, start=None, stop=None):
47324735
self.table = table
47334736
self.where = where
47344737
self.start = start

0 commit comments

Comments
 (0)