Powered By GitBook
Series.dt.weekdays
Obtain the days of the weeks
danfo.Series.dt.weekdays() [source]
Parameters: None
Returns: Series (String elements)
Examples
Node
Browser
1
const dfd = require("danfojs-node")
2
3
let data = new dfd.date_range({"start":'2016-12-31', "end":'2017-01-08'})
4
let sf = new dfd.Series(data)
5
//print series
6
sf.print()
7
//print days of the week
8
sf.dt.weekdays().print()
Copied!
1
Copied!
1
╔═══╤════════════════════════╗
2
║ 0 │ 12/31/2016, 1:00:00 AM ║
3
╟───┼────────────────────────╢
4
║ 1 │ 1/1/2017, 1:00:00 AM ║
5
╟───┼────────────────────────╢
6
║ 2 │ 1/2/2017, 1:00:00 AM ║
7
╟───┼────────────────────────╢
8
║ 3 │ 1/3/2017, 1:00:00 AM ║
9
╟───┼────────────────────────╢
10
║ 4 │ 1/4/2017, 1:00:00 AM ║
11
╟───┼────────────────────────╢
12
║ 5 │ 1/5/2017, 1:00:00 AM ║
13
╟───┼────────────────────────╢
14
║ 6 │ 1/6/2017, 1:00:00 AM ║
15
╟───┼────────────────────────╢
16
║ 7 │ 1/7/2017, 1:00:00 AM ║
17
╟───┼────────────────────────╢
18
║ 8 │ 1/8/2017, 1:00:00 AM ║
19
╟───┼────────────────────────╢
20
║ 9 │ 1/9/2017, 1:00:00 AM ║
21
╚═══╧════════════════════════╝
22
23
╔═══╤══════╗
24
║ 0 │ Sat ║
25
╟───┼──────╢
26
║ 1 │ Sun ║
27
╟───┼──────╢
28
║ 2 │ Mon ║
29
╟───┼──────╢
30
║ 3 │ Tue ║
31
╟───┼──────╢
32
║ 4 │ Wed ║
33
╟───┼──────╢
34
║ 5 │ Thur ║
35
╟───┼──────╢
36
║ 6 │ Fri ║
37
╟───┼──────╢
38
║ 7 │ Sat ║
39
╟───┼──────╢
40
║ 8 │ Sun ║
41
╟───┼──────╢
42
║ 9 │ Mon ║
43
╚═══╧══════╝
Copied!
Last modified 13d ago
Copy link