Obtain the month in a date time series
danfo.Series.dt.month() [source]
Parameters: None
Returns: Series (int elements)
Examples
const dfd = require("danfojs-node") let data = new dfd.dateRange({"start":'2016-7-31', "end":'2016-12-08', freq:"M"}) let sf = new dfd.Series(data) sf.dt.month().print()
╔═══╤════╗ ║ 0 │ 6 ║ ╟───┼────╢ ║ 1 │ 7 ║ ╟───┼────╢ ║ 2 │ 9 ║ ╟───┼────╢ ║ 3 │ 9 ║ ╟───┼────╢ ║ 4 │ 11 ║ ╟───┼────╢ ║ 5 │ 11 ║ ╚═══╧════╝
Last updated 2 years ago