Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 1.22 KB

series.dt.second.md

File metadata and controls

58 lines (46 loc) · 1.22 KB
description
Obtain the seconds in Date series

Series.dt.seconds

danfo.Series.dt.seconds()

Parameters: None

Returns: Series (Int elements)

Example

Obtain the seconds of the datetime

{% tabs %} {% tab title="Node" %}

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()

{% endtab %}

{% tab title="Browser" %}

{% endtab %} {% endtabs %}

{% tabs %} {% tab title="Output" %}

╔═══╤══════════════════════╗
║ 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 ║
╚═══╧═══╝

{% endtab %} {% endtabs %}