modin.pandas.Series.dt.seconds¶
- Series.dt.seconds[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/.tox/docs/lib/python3.9/site-packages/modin/pandas/series_utils.py#L785-L787)¶
Number of seconds (>= 0 and less than 1 day) for each element.
Examples
For Series:
>>> ser = pd.Series(pd.to_timedelta([1, 2, 3], unit='s')) >>> ser 0 0 days 00:00:01 1 0 days 00:00:02 2 0 days 00:00:03 dtype: timedelta64[ns] >>> ser.dt.seconds 0 1 1 2 2 3 dtype: int64
For TimedeltaIndex:
>>> tdelta_idx = pd.to_timedelta([1, 2, 3], unit='s') >>> tdelta_idx TimedeltaIndex(['0 days 00:00:01', '0 days 00:00:02', '0 days 00:00:03'], dtype='timedelta64[ns]', freq=None) >>> tdelta_idx.seconds Index([1, 2, 3], dtype='int64')