Skip to content

Commit 277ab9f

Browse files
committed
Update whatsnew and benchmarks
1 parent 2b10024 commit 277ab9f

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

asv_bench/benchmarks/rolling.py

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,25 +65,15 @@ class Quantile(object):
6565
params = (['DataFrame', 'Series'],
6666
[10, 1000],
6767
['int', 'float'],
68-
[0, 0.5, 1])
68+
[0, 0.5, 1],
69+
['linear', 'nearest', 'lower', 'higher', 'midpoint'])
6970
param_names = ['constructor', 'window', 'dtype', 'percentile']
7071

71-
def setup(self, constructor, window, dtype, percentile):
72+
def setup(self, constructor, window, dtype, percentile, interpolation):
7273
N = 10 ** 5
7374
arr = np.random.random(N).astype(dtype)
7475
self.roll = getattr(pd, constructor)(arr).rolling(window)
7576

76-
def time_quantile(self, constructor, window, dtype, percentile):
77-
self.roll.quantile(percentile)
78-
79-
def time_quantile_nearest(self, constructor, window, dtype, percentile):
80-
self.roll.quantile(percentile, interpolation='nearest')
81-
82-
def time_quantile_lower(self, constructor, window, dtype, percentile):
83-
self.roll.quantile(percentile, interpolation='lower')
84-
85-
def time_quantile_higher(self, constructor, window, dtype, percentile):
86-
self.roll.quantile(percentile, interpolation='higher')
87-
88-
def time_quantile_midpoint(self, constructor, window, dtype, percentile):
89-
self.roll.quantile(percentile, interpolation='midpoint')
77+
def time_quantile(self, constructor, window, dtype, percentile,
78+
interpolation):
79+
self.roll.quantile(percentile, interpolation=interpolation)

doc/source/whatsnew/v0.23.0.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ Other Enhancements
402402
- :meth:`DataFrame.to_sql` now performs a multivalue insert if the underlying connection supports itk rather than inserting row by row.
403403
``SQLAlchemy`` dialects supporting multivalue inserts include: ``mysql``, ``postgresql``, ``sqlite`` and any dialect with ``supports_multivalues_insert``. (:issue:`14315`, :issue:`8953`)
404404
- :func:`read_html` now accepts a ``displayed_only`` keyword argument to controls whether or not hidden elements are parsed (``True`` by default) (:issue:`20027`)
405+
- :meth:`Rolling.quantile` and :meth:`Expanding.quantile` now accept ``interpolation`` keyword (``linear`` by default) (:issue:`20497`)
405406
- zip compression is supported via ``compression=zip`` in :func:`DataFrame.to_pickle`, :func:`Series.to_pickle`, :func:`DataFrame.to_csv`, :func:`Series.to_csv`, :func:`DataFrame.to_json`, :func:`Series.to_json`. (:issue:`17778`)
406407
- :class:`DataFrame` and :class:`Series` now support matrix multiplication (```@```) operator (:issue:`10259`) for Python>=3.5
407408
- :meth:`Rolling.quantile` and :meth:`Expanding.quantile` now accept ``interpolation`` keyword

0 commit comments

Comments
 (0)