mars.dataframe.Series.dt.components#

Series.dt.components#

Return a Dataframe of the components of the Timedeltas.

Return type

DataFrame

Examples

>>> import mars.tensor as mt
>>> import mars.dataframe as md
>>> s = md.Series(md.to_timedelta(mt.arange(5), unit='s'))
>>> s.execute()
0   0 days 00:00:00
1   0 days 00:00:01
2   0 days 00:00:02
3   0 days 00:00:03
4   0 days 00:00:04
dtype: timedelta64[ns]
>>> s.dt.components.execute()
   days  hours  minutes  seconds  milliseconds  microseconds  nanoseconds
0     0      0        0        0             0             0            0
1     0      0        0        1             0             0            0
2     0      0        0        2             0             0            0
3     0      0        0        3             0             0            0
4     0      0        0        4             0             0            0