Series.quantile

Series.quantile(q: int | float | List[int] | List[float] = 0.5) Series | Any[source]

Used to calculate quantile for a given Series.

Parameters

q:

float or array like, default 0.5 Value between 0 <= q <= 1, the quantile(s) to compute.

Returns

pandas.Series or any single dtype

See Also

:pandas_api_docs:`pandas.Series.quantile`

Examples

>>> from tests import OPENSEARCH_TEST_CLIENT
>>> oml_flights = oml.DataFrame(OPENSEARCH_TEST_CLIENT, 'flights')
>>> oml_flights["timestamp"].quantile([.2,.5,.75]) 
0.20   2018-01-09 04:30:57.289159912
0.50   2018-01-21 23:39:27.031627441
0.75   2018-02-01 04:54:59.256136963
Name: timestamp, dtype: datetime64[ns]
>>> oml_flights["dayOfWeek"].quantile() 
3.0
>>> oml_flights["timestamp"].quantile() 
Timestamp('2018-01-22 00:12:48.844534180')