Series.dt.seconds

Obtain the seconds in Date series

danfo.Series.dt.seconds()

Parameters: None

Returns: Series (Int elements)

Example

Obtain the seconds of the datetime

const dfd = require("danfojs-node")

let data = new dfd.dateRange({"start":"2000-01-01", period:3, freq:"s"})
let sf = new dfd.Series(data)
//print the series frame
sf.print()

//print the seconds obtained
sf.dt.seconds().print()
╔═══╤══════════════════════╗
║ 0 │ 1/1/2000, 1:00:00 AM ║
╟───┼──────────────────────╢
║ 1 │ 1/1/2000, 1:00:01 AM ║
╟───┼──────────────────────╢
║ 2 │ 1/1/2000, 1:00:02 AM ║
╚═══╧══════════════════════╝

╔═══╤═══╗
║ 0 │ 0 ║
╟───┼───╢
║ 1 │ 1 ║
╟───┼───╢
║ 2 │ 2 ║
╚═══╧═══╝

Last updated