浏览代码

Updating remove_weekends function

"|" is not equal "or" and drops only one weekend, not two with "or".
Marat 4 年之前
父节点
当前提交
32c1046873
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      stocker/stocker.py

+ 1 - 1
stocker/stocker.py

@@ -341,7 +341,7 @@ class Stocker:
 
         # Find all of the weekends
         for i, date in enumerate(dataframe["ds"]):
-            if (date.weekday()) == 5 | (date.weekday() == 6):
+            if (date.weekday()) == 5 or (date.weekday() == 6):
                 weekends.append(i)
 
         # Drop the weekends