用法:
Rolling.quantile(quantile)计算滚动分位数。
此文档字符串是从 pandas.core.window.rolling.Rolling.quantile 复制的。
可能存在与 Dask 版本的一些不一致之处。
- quantile:浮点数
要计算的分位数。 0 <= 分位数 <= 1。
- interpolation:{‘linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’}(Dask 不支持)
当所需的分位数位于两个数据点
i和j之间时,此可选参数指定要使用的插值方法:线性:
i + (j - i) * fraction,其中fraction是由i和j包围的索引的小数部分。下:
i。更高:
j。最近:
i或j以最近的为准。中点:(
i+j)/2。
- **kwargs:
为了 NumPy 的兼容性,不会对结果产生影响。
- Series或DataFrame
返回类型与
np.float64dtype 的原始对象相同。
参数:
返回:
例子:
>>> s = pd.Series([1, 2, 3, 4]) >>> s.rolling(2).quantile(.4, interpolation='lower') 0 NaN 1 1.0 2 2.0 3 3.0 dtype: float64>>> s.rolling(2).quantile(.4, interpolation='midpoint') 0 NaN 1 1.5 2 2.5 3 3.5 dtype: float64
相关用法
- Python dask.dataframe.rolling.Rolling.var用法及代码示例
- Python dask.dataframe.rolling.Rolling.count用法及代码示例
- Python dask.dataframe.rolling.Rolling.min用法及代码示例
- Python dask.dataframe.rolling.Rolling.std用法及代码示例
- Python dask.dataframe.rolling.Rolling.sum用法及代码示例
- Python dask.dataframe.rolling.Rolling.kurt用法及代码示例
- Python dask.dataframe.rolling.Rolling.mean用法及代码示例
- Python dask.dataframe.rolling.Rolling.median用法及代码示例
- Python dask.dataframe.read_table用法及代码示例
- Python dask.dataframe.read_hdf用法及代码示例
- Python dask.dataframe.read_json用法及代码示例
- Python dask.dataframe.read_fwf用法及代码示例
- Python dask.dataframe.read_sql_table用法及代码示例
- Python dask.dataframe.read_parquet用法及代码示例
- Python dask.dataframe.read_csv用法及代码示例
- Python dask.dataframe.reshape.get_dummies用法及代码示例
- Python dask.dataframe.read_orc用法及代码示例
- Python dask.dataframe.Series.apply用法及代码示例
- Python dask.dataframe.to_records用法及代码示例
- Python dask.dataframe.DataFrame.applymap用法及代码示例
注:本文由纯净天空筛选整理自dask.org大神的英文原创作品 dask.dataframe.rolling.Rolling.quantile。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
