Powered By GitBook
Series.dt.month
Obtain the month in a date time series
danfo.Series.dt.month() [source]
Parameters: None
Returns: Series (int elements)
Examples
Node
Browser
1
const dfd = require("danfojs-node")
2
3
let data = new dfd.date_range({"start":'2016-7-31', "end":'2016-12-08', freq:"M"})
4
let sf = new dfd.Series(data)
5
6
sf.dt.month().print()
Copied!
1
Copied!
1
╔═══╤════╗
2
║ 0 │ 6 ║
3
╟───┼────╢
4
║ 1 │ 7 ║
5
╟───┼────╢
6
║ 2 │ 9 ║
7
╟───┼────╢
8
║ 3 │ 9 ║
9
╟───┼────╢
10
║ 4 │ 11 ║
11
╟───┼────╢
12
║ 5 │ 11 ║
13
╚═══╧════╝
Copied!
Last modified 24d ago
Copy link