datatable.time.second()

Added in version 1.0.0

Retrieve the “second” component of a time64 column. The produced column will have values in the range [0; 59].

Parameters

time
FExpr[time64]

A column for which you want to compute the second part.

return
FExpr[int32]

The “second” part of the source column.

Examples

from datetime import datetime as d DT = dt.Frame([d(2020, 5, 11, 12, 0, 0), d(2021, 6, 14, 16, 10, 59, 394873)]) DT[:, {'time': f[0], 'second': dt.time.second(f[0])}]
timesecond
time64int32
02020-05-11T12:00:00 0
12021-06-14T16:10:59.39487359

See Also

  • hour() – retrieve the “hour” component of a timestamp

  • minute() – retrieve the “minute” component of a timestamp

  • nanosecond() – retrieve the “nanosecond” component of a timestamp