filipeclduarte commited on
Commit
2184cf1
·
1 Parent(s): 9fa0a4d

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +12 -13
utils.py CHANGED
@@ -1,15 +1,14 @@
1
 
2
  def calc_seasonality(freq):
3
- match freq:
4
- case 'Y':
5
- return 10
6
- case 'Q':
7
- return 4
8
- case 'M':
9
- return 12
10
- case 'W':
11
- return 4
12
- case 'D':
13
- return 7
14
- case _:
15
- return "You didn't choose the correct frequency. Use: Y, Q, M, W and D"
 
1
 
2
  def calc_seasonality(freq):
3
+ if freq == 'Y':
4
+ return 10
5
+ elif freq == 'Q':
6
+ return 4
7
+ elif freq == 'M':
8
+ return 12
9
+ elif freq == 'W':
10
+ return 4
11
+ elif freq == 'D':
12
+ return 7
13
+ else:
14
+ return "You didn't choose the correct frequency. Use: Y, Q, M, W and D"