datatable.time.nanosecond()

Added in version 1.0.0

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

Parameters

time
FExpr[time64]

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

return
FExpr[int32]

The “nanosecond” 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], 'ns': dt.time.nanosecond(f[0])}]
timens
time64int32
02020-05-11T12:00:00 0
12021-06-14T16:10:59.394873394873000

See Also

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

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

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