目录
- 新功能
- 安装
- 贡献给pandas
- 常见问题(FAQ)
- 套装概述
- 10分钟到熊猫
- 教程
- 食谱
- 数据结构简介
- 基本基本功能
- 使用文本数据
- 选项和设置
- 索引和选择数据
- MultiIndex /高级索引
- 计算工具
- 使用缺失数据
- 分组:split-apply-combine
- 合并,连接和连接
- 整形和数据透视表
- 时间系列/日期功能
- 时间Deltas
- 分类数据
- 可视化
- 样式
- IO工具(文本,CSV,HDF5,...)
- 远程数据访问
- 增强性能
- 稀疏数据结构
- 告诫和诀窍
- rpy2 / R interface
- pandas生态系统
- 与R / R库比较
- 与SQL比较
- 与SAS的比较
- API参考
- 输入/输出
- 一般功能
- 系列
- DataFrame
- 面板
- Panel4D
- 索引
- CategoricalIndex
- MultiIndex
- DatetimeIndex
- TimedeltaIndex
- pandas.TimedeltaIndex
- pandas.TimedeltaIndex.T
- pandas.TimedeltaIndex.asi8
- pandas.TimedeltaIndex.asobject
- pandas.TimedeltaIndex.base
- pandas.TimedeltaIndex.components
- pandas.TimedeltaIndex.data
- pandas.TimedeltaIndex.days
- pandas.TimedeltaIndex.dtype
- pandas.TimedeltaIndex.dtype_str
- pandas.TimedeltaIndex.flags
- pandas.TimedeltaIndex.freq
- pandas.TimedeltaIndex.freqstr
- pandas.TimedeltaIndex.has_duplicates
- pandas.TimedeltaIndex.hasnans
- pandas.TimedeltaIndex.inferred_freq
- pandas.TimedeltaIndex.inferred_type
- pandas.TimedeltaIndex.is_all_dates
- pandas.TimedeltaIndex.is_monotonic
- pandas.TimedeltaIndex.is_monotonic_decreasing
- pandas.TimedeltaIndex.is_monotonic_increasing
- pandas.TimedeltaIndex.is_unique
- pandas.TimedeltaIndex.itemsize
- pandas.TimedeltaIndex.microseconds
- pandas.TimedeltaIndex.name
- pandas.TimedeltaIndex.names
- pandas.TimedeltaIndex.nanoseconds
- pandas.TimedeltaIndex.nbytes
- pandas.TimedeltaIndex.ndim
- pandas.TimedeltaIndex.nlevels
- pandas.TimedeltaIndex.resolution
- pandas.TimedeltaIndex.seconds
- pandas.TimedeltaIndex.shape
- pandas.TimedeltaIndex.size
- pandas.TimedeltaIndex.strides
- pandas.TimedeltaIndex.values
- pandas.TimedeltaIndex.all
- pandas.TimedeltaIndex.any
- pandas.TimedeltaIndex.append
- pandas.TimedeltaIndex.argmax
- pandas.TimedeltaIndex.argmin
- pandas.TimedeltaIndex.argsort
- pandas.TimedeltaIndex.asof
- pandas.TimedeltaIndex.asof_locs
- pandas.TimedeltaIndex.astype
- pandas.TimedeltaIndex.ceil
- pandas.TimedeltaIndex.copy
- pandas.TimedeltaIndex.delete
- pandas.TimedeltaIndex.difference
- pandas.TimedeltaIndex.drop
- pandas.TimedeltaIndex.drop_duplicates
- pandas.TimedeltaIndex.dropna
- pandas.TimedeltaIndex.duplicated
- pandas.TimedeltaIndex.equals
- pandas.TimedeltaIndex.factorize
- pandas.TimedeltaIndex.fillna
- pandas.TimedeltaIndex.floor
- pandas.TimedeltaIndex.format
- pandas.TimedeltaIndex.get_duplicates
- pandas.TimedeltaIndex.get_indexer
- pandas.TimedeltaIndex.get_indexer_for
- pandas.TimedeltaIndex.get_indexer_non_unique
- pandas.TimedeltaIndex.get_level_values
- pandas.TimedeltaIndex.get_loc
- pandas.TimedeltaIndex.get_slice_bound
- pandas.TimedeltaIndex.get_value
- pandas.TimedeltaIndex.get_value_maybe_box
- pandas.TimedeltaIndex.get_values
- pandas.TimedeltaIndex.groupby
- pandas.TimedeltaIndex.holds_integer
- pandas.TimedeltaIndex.identical
- pandas.TimedeltaIndex.insert
- pandas.TimedeltaIndex.intersection
- pandas.TimedeltaIndex.is
- pandas.TimedeltaIndex.is_boolean
- pandas.TimedeltaIndex.is_categorical
- pandas.TimedeltaIndex.is_floating
- pandas.TimedeltaIndex.is_integer
- pandas.TimedeltaIndex.is_lexsorted_for_tuple
- pandas.TimedeltaIndex.is_mixed
- pandas.TimedeltaIndex.is_numeric
- pandas.TimedeltaIndex.is_object
- pandas.TimedeltaIndex.is_type_compatible
- pandas.TimedeltaIndex.isin
- pandas.TimedeltaIndex.item
- pandas.TimedeltaIndex.join
- pandas.TimedeltaIndex.map
- pandas.TimedeltaIndex.max
- pandas.TimedeltaIndex.memory_usage
- pandas.TimedeltaIndex.min
- pandas.TimedeltaIndex.nunique
- pandas.TimedeltaIndex.order
- pandas.TimedeltaIndex.putmask
- pandas.TimedeltaIndex.ravel
- pandas.TimedeltaIndex.reindex
- pandas.TimedeltaIndex.rename
- pandas.TimedeltaIndex.repeat
- pandas.TimedeltaIndex.reshape
- pandas.TimedeltaIndex.round
- pandas.TimedeltaIndex.searchsorted
- pandas.TimedeltaIndex.set_names
- pandas.TimedeltaIndex.set_value
- pandas.TimedeltaIndex.shift
- pandas.TimedeltaIndex.slice_indexer
- pandas.TimedeltaIndex.slice_locs
- pandas.TimedeltaIndex.sort
- pandas.TimedeltaIndex.sort_values
- pandas.TimedeltaIndex.sortlevel
- pandas.TimedeltaIndex.str
- pandas.TimedeltaIndex.summary
- pandas.TimedeltaIndex.sym_diff
- pandas.TimedeltaIndex.symmetric_difference
- pandas.TimedeltaIndex.take
- pandas.TimedeltaIndex.to_datetime
- pandas.TimedeltaIndex.to_native_types
- pandas.TimedeltaIndex.to_pytimedelta
- pandas.TimedeltaIndex.to_series
- pandas.TimedeltaIndex.tolist
- pandas.TimedeltaIndex.total_seconds
- pandas.TimedeltaIndex.transpose
- pandas.TimedeltaIndex.union
- pandas.TimedeltaIndex.unique
- pandas.TimedeltaIndex.value_counts
- pandas.TimedeltaIndex.view
- pandas.TimedeltaIndex.where
- 组件
- 转换
- pandas.TimedeltaIndex
- 窗口
- GroupBy
- 重新采样
- 样式
- 通用效用函数
- 内部
- 发行说明
搜索
输入搜索字词或模块,类或函数名称。
pandas.TimedeltaIndex.get_indexer¶
-
TimedeltaIndex.
get_indexer
(target, method=None, limit=None, tolerance=None)[source]¶ 给定当前索引的新索引的计算索引器和掩码。索引器应该用作ndarray.take的输入,以将当前数据与新索引对齐。
参数: 目标:索引
方法:{None,'pad'/'ffill','backfill'/'bfill','nearest'},可选
- default:仅精确匹配。
- pad / ffill:如果没有精确匹配,找到PREVIOUS索引值。
- backfill / bfill:如果没有完全匹配,请使用NEXT索引值
- 最近:如果没有完全匹配,请使用NEAREST索引值。优选较大的索引值打破了绑定距离。
limit:int,可选
target
中的连续标签的最大数量,以匹配不完全匹配。公差:可选
不完全匹配的原始和新标签之间的最大距离。匹配位置处的索引的值最满足等式
abs(index [indexer] - target) ; = tolerance
。版本0.17.0中的新功能。
返回: indexer:ndarray of int
从0到n-1的整数,指示这些位置处的索引与相应的目标值匹配。目标中的缺失值标记为-1。
例子
>>> indexer = index.get_indexer(new_index) >>> new_values = cur_values.take(indexer)