@@ -7463,15 +7463,13 @@ def quantile(self, q=0.5, axis=0, numeric_only=True,
7463
7463
Parameters
7464
7464
----------
7465
7465
q : float or array-like, default 0.5 (50% quantile)
7466
- 0 <= q <= 1, the quantile(s) to compute
7466
+ Value between 0 <= q <= 1, the quantile(s) to compute.
7467
7467
axis : {0, 1, 'index', 'columns'} (default 0)
7468
- 0 or 'index' for row-wise, 1 or 'columns' for column-wise
7469
- numeric_only : boolean , default True
7468
+ Equals 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
7469
+ numeric_only : bool , default True
7470
7470
If False, the quantile of datetime and timedelta data will be
7471
- computed as well
7471
+ computed as well.
7472
7472
interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
7473
- .. versionadded:: 0.18.0
7474
-
7475
7473
This optional parameter specifies the interpolation method to use,
7476
7474
when the desired quantile lies between two data points `i` and `j`:
7477
7475
@@ -7482,6 +7480,8 @@ def quantile(self, q=0.5, axis=0, numeric_only=True,
7482
7480
* nearest: `i` or `j` whichever is nearest.
7483
7481
* midpoint: (`i` + `j`) / 2.
7484
7482
7483
+ .. versionadded:: 0.18.0
7484
+
7485
7485
Returns
7486
7486
-------
7487
7487
quantiles : Series or DataFrame
@@ -7494,18 +7494,17 @@ def quantile(self, q=0.5, axis=0, numeric_only=True,
7494
7494
7495
7495
See Also
7496
7496
--------
7497
- pandas. core.window.Rolling.quantile
7498
- numpy.percentile
7497
+ core.window.Rolling.quantile: Rolling quantile.
7498
+ numpy.percentile: Numpy function to compute the percentile.
7499
7499
7500
7500
Examples
7501
7501
--------
7502
-
7503
7502
>>> df = pd.DataFrame(np.array([[1, 1], [2, 10], [3, 100], [4, 100]]),
7504
- columns=['a', 'b'])
7503
+ ... columns=['a', 'b'])
7505
7504
>>> df.quantile(.1)
7506
7505
a 1.3
7507
7506
b 3.7
7508
- dtype: float64
7507
+ Name: 0.1, dtype: float64
7509
7508
>>> df.quantile([.1, .5])
7510
7509
a b
7511
7510
0.1 1.3 3.7
@@ -7515,10 +7514,10 @@ def quantile(self, q=0.5, axis=0, numeric_only=True,
7515
7514
datetime and timedelta data.
7516
7515
7517
7516
>>> df = pd.DataFrame({'A': [1, 2],
7518
- 'B': [pd.Timestamp('2010'),
7519
- pd.Timestamp('2011')],
7520
- 'C': [pd.Timedelta('1 days'),
7521
- pd.Timedelta('2 days')]})
7517
+ ... 'B': [pd.Timestamp('2010'),
7518
+ ... pd.Timestamp('2011')],
7519
+ ... 'C': [pd.Timedelta('1 days'),
7520
+ ... pd.Timedelta('2 days')]})
7522
7521
>>> df.quantile(0.5, numeric_only=False)
7523
7522
A 1.5
7524
7523
B 2010-07-02 12:00:00
0 commit comments