Skip to content

Commit f5fb6cb

Browse files
committed
Update documentation
1 parent 412eb98 commit f5fb6cb

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

pandas/core/frame.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7079,6 +7079,10 @@ def quantile(self, q=0.5, axis=0, numeric_only=True,
70797079
a b
70807080
0.1 1.3 3.7
70817081
0.5 2.5 55.0
7082+
7083+
See Also
7084+
--------
7085+
pandas.core.window.Rolling.quantile
70827086
"""
70837087
self._check_percentile(q)
70847088

pandas/core/series.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,6 +1855,9 @@ def quantile(self, q=0.5, interpolation='linear'):
18551855
0.75 3.25
18561856
dtype: float64
18571857
1858+
See Also
1859+
--------
1860+
pandas.core.window.Rolling.quantile
18581861
"""
18591862

18601863
self._check_percentile(q)

pandas/core/window.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,36 @@ def kurt(self, **kwargs):
12881288
* lower: `i`.
12891289
* higher: `j`.
12901290
* nearest: `i` or `j` whichever is nearest.
1291-
* midpoint: (`i` + `j`) / 2.""")
1291+
* midpoint: (`i` + `j`) / 2.
1292+
1293+
Returns
1294+
-------
1295+
Series or DataFrame
1296+
Returned object type is determined by the caller of the %(name)s
1297+
calculation
1298+
1299+
Examples
1300+
--------
1301+
>>> s = Series([1, 2, 3, 4])
1302+
>>> s.rolling(2).quantile(.4, interpolation='lower')
1303+
0 NaN
1304+
1 1.0
1305+
2 2.0
1306+
3 3.0
1307+
dtype: float64
1308+
>>> s.rolling(2).quantile(.4, interpolation='midpoint')
1309+
0 NaN
1310+
1 1.5
1311+
2 2.5
1312+
3 3.5
1313+
dtype: float64
1314+
1315+
See Also
1316+
--------
1317+
pandas.Series.quantile
1318+
pandas.DataFrame.quantile
1319+
1320+
""")
12921321

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

0 commit comments

Comments
 (0)