Powered By GitBook
Series.dt.month_name
obtain the month name in a Time Series
danfo.Series.dt.month_name() [source]
Parameters: None
Returns: Series (String elements)
Examples
Output
Browser
1
const dfd = require("danfojs-node")
2
3
let data = new dfd.date_range({"start":'2018-01', freq:'M', period:3})
4
let sf = new dfd.Series(data)
5
//print series
6
sf.print()
7
//print month names
8
sf.dt.month_name().print()
Copied!
1
Copied!
Output
1
╔═══╤══════════════════════╗
2
║ 0 │ 1/1/2018, 1:00:00 AM ║
3
╟───┼──────────────────────╢
4
║ 1 │ 2/1/2018, 1:00:00 AM ║
5
╟───┼──────────────────────╢
6
║ 2 │ 3/1/2018, 1:00:00 AM ║
7
╚═══╧══════════════════════╝
8
9
╔═══╤═════╗
10
║ 0 │ Jan ║
11
╟───┼─────╢
12
║ 1 │ Feb ║
13
╟───┼─────╢
14
║ 2 │ Mar ║
15
╚═══╧═════╝
Copied!
Last modified 24d ago
Copy link