Series.dt.monthName

obtain the month name in a Time Series

danfo.Series.dt.monthName() [source]

Parameters: None

Returns: Series (String elements)

Examples

const dfd = require("danfojs-node")

let data = new dfd.date_range({"start":'2018-01', freq:'M', period:3})
let sf = new dfd.Series(data)
//print series
sf.print()
//print month names
sf.dt.monthName().print()
╔═══╤══════════════════════╗
║ 0 │ 1/1/2018, 1:00:00 AM ║
╟───┼──────────────────────╢
║ 1 │ 2/1/2018, 1:00:00 AM ║
╟───┼──────────────────────╢
║ 2 │ 3/1/2018, 1:00:00 AM ║
╚═══╧══════════════════════╝

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

Last updated