Python Pandas TimedeltaIndex.comments
Python是一种进行数据分析的伟大语言,主要是因为以数据为中心的Python包的奇妙生态系统。Pandas就是这些包中的一个,它使导入和分析数据变得更加容易。
Pandas TimedeltaIndex.component属性返回Timedeltas的组件(天、小时、分钟、秒、毫秒、微秒、纳秒)的数据帧。
语法: TimedeltaIndex.components
返回 : 一个数据框架
例子#1:使用TimedeltaIndex.component属性来返回Timedeltas组件的数据帧。
输出 :
现在,我们想返回一个由tidx对象组成的数据框架。
输出 :
正如我们在输出中看到的,TimedeltaIndex.component属性返回了一个由Timedelta.component构建的数据框架。
例子#2:使用TimedeltaIndex.component属性来返回Timedeltas组件的数据帧。
输出 :
现在,我们想返回一个由tidx对象组成的数据框架。
输出 :
正如我们在输出中看到的,TimedeltaIndex.component属性返回了一个由Timedelta.component构建的数据框架。