From 61dcee3aa513f047b16f244b4984750994e12205 Mon Sep 17 00:00:00 2001 From: Kyle Prestel Date: Sat, 3 Nov 2018 12:14:36 -0400 Subject: [PATCH] Address merge comments --- pandas/core/groupby/groupby.py | 16 ++++------------ pandas/io/pytables.py | 3 ++- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 688f64e695c0a..0edba6f6b4f7f 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -1755,12 +1755,8 @@ def cummin(self, axis=0, **kwargs): if axis != 0: return self.apply(lambda x: np.minimum.accumulate(x, axis)) - if kwargs.get('numeric_only') or False: - numeric_only = kwargs.get('numeric_only') - else: - numeric_only = False - - return self._cython_transform('cummin', numeric_only=numeric_only) + return self._cython_transform('cummin', + numeric_only=kwargs.get('numeric_only') or False) @Substitution(name='groupby') @Appender(_doc_template) @@ -1769,12 +1765,8 @@ def cummax(self, axis=0, **kwargs): if axis != 0: return self.apply(lambda x: np.maximum.accumulate(x, axis)) - if kwargs: - numeric_only = kwargs.get('numeric_only') - else: - numeric_only = False - - return self._cython_transform('cummax', numeric_only=numeric_only) + return self._cython_transform('cummax', + numeric_only=kwargs.get('numeric_only') or False) def _get_cythonized_result(self, how, grouper, aggregate=False, cython_dtype=None, needs_values=False, diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 7e673c0366582..4c28e0f88b1ae 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -3971,7 +3971,8 @@ def write(self, obj, axes=None, append=False, complib=None, # create the axes self.create_axes(axes=axes, obj=obj, validate=append, - min_itemsize=min_itemsize, **kwargs) + min_itemsize=min_itemsize, + **kwargs) for a in self.axes: a.validate(self, append)