Skip to content

Commit 53e5a2b

Browse files
No-Streamjreback
authored andcommitted
ENH: gb.is_monotonic_increasing, is_monotonic_decreasing pandas-dev#17015
1 parent d88acdd commit 53e5a2b

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

doc/source/whatsnew/v0.21.0.txt

+5
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ Various enhancements
323323
- `read_*` methods can now infer compression from non-string paths, such as ``pathlib.Path`` objects (:issue:`17206`).
324324
- :func:`pd.read_sas()` now recognizes much more of the most frequently used date (datetime) formats in SAS7BDAT files (:issue:`15871`).
325325
- :func:`DataFrame.items` and :func:`Series.items` is now present in both Python 2 and 3 and is lazy in all cases (:issue:`13918`, :issue:`17213`)
326+
<<<<<<< HEAD
326327

327328
- Improved the import time of pandas by about 2.25x. (:issue:`16764`)
328329
- Support for `PEP 519 -- Adding a file system path protocol
@@ -347,6 +348,10 @@ Various enhancements
347348
- :func:`read_excel` raises ``ImportError`` with a better message if ``xlrd`` is not installed. (:issue:`17613`)
348349
- :meth:`DataFrame.assign` will preserve the original order of ``**kwargs`` for Python 3.6+ users instead of sorting the column names. (:issue:`14207`)
349350
- :func:`Series.reindex`, :func:`DataFrame.reindex`, :func:`Index.get_indexer` now support list-like argument for ``tolerance``. (:issue:`17367`)
351+
=======
352+
- :func: groupby.is_monotonic_increasing and .is_monotonic_decreasing extend Series.is_monotonic_increasing to groups, returning whether each group is monotonically increasing or decreasing, respectively. (:issue:`17015`)
353+
354+
>>>>>>> e99897c... ENH: gb.is_monotonic_increasing, is_monotonic_decreasing #17015
350355

351356
.. _whatsnew_0210.api_breaking:
352357

pandas/core/groupby.py

+3
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,7 @@ def tail(self, n=5):
16951695
mask = self._cumcount_array(ascending=False) < n
16961696
return self._selected_obj[mask]
16971697

1698+
<<<<<<< HEAD
16981699
def pipe(self, func, *args, **kwargs):
16991700
""" Apply a function with arguments to this GroupBy object,
17001701
@@ -1743,6 +1744,8 @@ def pipe(self, func, *args, **kwargs):
17431744
"""
17441745
return _pipe(self, func, *args, **kwargs)
17451746

1747+
=======
1748+
>>>>>>> e99897c... ENH: gb.is_monotonic_increasing, is_monotonic_decreasing #17015
17461749
@Substitution(name='groupby')
17471750
@Appender(_doc_template)
17481751
def is_monotonic_increasing(self):

pandas/tests/groupby/test_whitelist.py

+4
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,11 @@ def test_tab_completion(mframe):
249249
'cumsum', 'cumcount', 'ngroup', 'all', 'shift', 'skew',
250250
'take', 'tshift', 'pct_change', 'any', 'mad', 'corr', 'corrwith',
251251
'cov', 'dtypes', 'ndim', 'diff', 'idxmax', 'idxmin',
252+
<<<<<<< HEAD
252253
'ffill', 'bfill', 'pad', 'backfill', 'rolling', 'expanding', 'pipe',
254+
=======
255+
'ffill', 'bfill', 'pad', 'backfill', 'rolling', 'expanding',
256+
>>>>>>> e99897c... ENH: gb.is_monotonic_increasing, is_monotonic_decreasing #17015
253257
'is_monotonic_increasing', 'is_monotonic_decreasing'])
254258
assert results == expected
255259

0 commit comments

Comments
 (0)