diff --git a/standard_precip/base_sp.py b/standard_precip/base_sp.py index 3559db9..cf06dfd 100644 --- a/standard_precip/base_sp.py +++ b/standard_precip/base_sp.py @@ -213,7 +213,7 @@ def calculate(self, df: pd.DataFrame, date_col: str, precip_cols: list, freq: st if freq == "D": self._df_copy[self.freq_col] = self._df_copy[date_col].dt.dayofyear elif freq == "W": - self._df_copy[self.freq_col] = self._df_copy[date_col].dt.week + self._df_copy[self.freq_col] = self._df_copy[date_col].dt.isocalendar().week elif freq == "M": self._df_copy[self.freq_col] = self._df_copy[date_col].dt.month else: