Skip to content

Commit 9cee08a

Browse files
committed
Update documentation
1 parent e0d7ccd commit 9cee08a

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

pandas/core/frame.py

+4
Original file line numberDiff line numberDiff line change
@@ -7052,6 +7052,10 @@ def quantile(self, q=0.5, axis=0, numeric_only=True,
70527052
a b
70537053
0.1 1.3 3.7
70547054
0.5 2.5 55.0
7055+
7056+
See Also
7057+
--------
7058+
pandas.core.window.Rolling.quantile
70557059
"""
70567060
self._check_percentile(q)
70577061

pandas/core/series.py

+3
Original file line numberDiff line numberDiff line change
@@ -1852,6 +1852,9 @@ def quantile(self, q=0.5, interpolation='linear'):
18521852
0.75 3.25
18531853
dtype: float64
18541854
1855+
See Also
1856+
--------
1857+
pandas.core.window.Rolling.quantile
18551858
"""
18561859

18571860
self._check_percentile(q)

pandas/core/window.py

+30-1
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,36 @@ def kurt(self, **kwargs):
12581258
* lower: `i`.
12591259
* higher: `j`.
12601260
* nearest: `i` or `j` whichever is nearest.
1261-
* midpoint: (`i` + `j`) / 2.""")
1261+
* midpoint: (`i` + `j`) / 2.
1262+
1263+
Returns
1264+
-------
1265+
Series or DataFrame
1266+
Returned object type is determined by the caller of the %(name)s
1267+
calculation
1268+
1269+
Examples
1270+
--------
1271+
>>> s = Series([1, 2, 3, 4])
1272+
>>> s.rolling(2).quantile(.4, interpolation='lower')
1273+
0 NaN
1274+
1 1.0
1275+
2 2.0
1276+
3 3.0
1277+
dtype: float64
1278+
>>> s.rolling(2).quantile(.4, interpolation='midpoint')
1279+
0 NaN
1280+
1 1.5
1281+
2 2.5
1282+
3 3.5
1283+
dtype: float64
1284+
1285+
See Also
1286+
--------
1287+
pandas.Series.quantile
1288+
pandas.DataFrame.quantile
1289+
1290+
""")
12621291

12631292
def quantile(self, quantile, interpolation='linear', **kwargs):
12641293
window = self._get_window()

0 commit comments

Comments
 (0)