Skip to content

Commit

Permalink
Fix dropna argument for DWD Mosmix and DMO
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed May 19, 2024
1 parent d01b060 commit 9f34002
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog
Development
***********

- Fix `dropna` argument for DWD Mosmix and DMO

0.84.0 (15.05.2024)
*******************

Expand Down
3 changes: 3 additions & 0 deletions wetterdienst/provider/dwd/dmo/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,9 @@ def query(self) -> Iterator[ValuesResult]:
if not df.is_empty() and self.sr.start_date and self.sr.start_date != DwdForecastDate.LATEST:
df = df.filter(pl.col(Columns.DATE.value).is_between(self.sr.start_date, self.sr.end_date))

if self.sr.dropna:
df = df.drop_nulls(subset="value")

if not self.sr.tidy:
df = self._widen_df(df)

Expand Down
3 changes: 3 additions & 0 deletions wetterdienst/provider/dwd/mosmix/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,9 @@ def query(self) -> Iterator[ValuesResult]:
if not df.is_empty() and self.sr.start_date and self.sr.start_date != DwdForecastDate.LATEST:
df = df.filter(pl.col(Columns.DATE.value).is_between(self.sr.start_date, self.sr.end_date))

if self.sr.dropna:
df = df.drop_nulls(subset="value")

if not self.sr.tidy:
df = self._widen_df(df)

Expand Down

0 comments on commit 9f34002

Please sign in to comment.