用法:
class cudf.TimedeltaIndex(data=None, unit=None, freq=None, closed=None, dtype='timedelta64[ns]', copy=False, name=None)
timedelta64 数据的不可变、有序和可切片序列,内部表示为 int64。
- data:array-like(一维),可选
用于构建索引的可选datetime-like 数据。
- unit:str,可选
这还不支持
- copy:bool
制作输入的副本。
- freq:str,可选
这还不支持
- closed:str,可选
这还不支持
- dtype:str 或 numpy.dtype,可选
输出索引的数据类型。如果未指定,默认 dtype 将为
timedelta64[ns]
。- name:对象
要存储在索引中的名称。
- 时间增量索引
参数:
返回:
例子:
>>> import cudf >>> cudf.TimedeltaIndex([1132223, 2023232, 342234324, 4234324], ... dtype="timedelta64[ns]") TimedeltaIndex(['0 days 00:00:00.001132223', '0 days 00:00:00.002023232', '0 days 00:00:00.342234324', '0 days 00:00:00.004234324'], dtype='timedelta64[ns]') >>> cudf.TimedeltaIndex([1, 2, 3, 4], dtype="timedelta64[s]", ... name="delta-index") TimedeltaIndex(['0 days 00:00:01', '0 days 00:00:02', '0 days 00:00:03', '0 days 00:00:04'], dtype='timedelta64[s]', name='delta-index')
相关用法
- Python cudf.core.column.string.StringMethods.is_vowel用法及代码示例
- Python cudf.Series.ceil用法及代码示例
- Python cudf.core.column.string.StringMethods.endswith用法及代码示例
- Python cudf.Series.update用法及代码示例
- Python cudf.DataFrame.mod用法及代码示例
- Python cudf.DataFrame.isin用法及代码示例
- Python cudf.core.column.string.StringMethods.title用法及代码示例
- Python cudf.DataFrame.rmul用法及代码示例
- Python cudf.Series.max用法及代码示例
- Python cudf.DatetimeIndex.dayofweek用法及代码示例
- Python cudf.DataFrame.apply用法及代码示例
- Python cudf.core.column.string.StringMethods.contains用法及代码示例
- Python cudf.core.column.string.StringMethods.rsplit用法及代码示例
- Python cudf.DataFrame.exp用法及代码示例
- Python cudf.Series.head用法及代码示例
- Python cudf.DataFrame.drop用法及代码示例
- Python cudf.core.column.string.StringMethods.zfill用法及代码示例
- Python cudf.Series.reindex用法及代码示例
- Python cudf.Series.interleave_columns用法及代码示例
- Python cudf.core.series.DatetimeProperties.month用法及代码示例
注:本文由纯净天空筛选整理自rapids.ai大神的英文原创作品 cudf.TimedeltaIndex。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。