Skip to content

Commit

Permalink
Update imgw function call
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Jul 11, 2023
1 parent c27dde8 commit 399d955
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wetterdienst/provider/dwd/road/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def __parse_dwd_road_weather_data(filename_and_file: Tuple[str, BytesIO], parame
df = df.select(
pl.col("shortStationName"),
pl.concat_str(
[
exprs=[
pl.col("year").cast(pl.Utf8),
pl.col("month").cast(pl.Utf8).str.rjust(2, "0"),
pl.col("day").cast(pl.Utf8).str.rjust(2, "0"),
Expand Down
4 changes: 2 additions & 2 deletions wetterdienst/provider/imgw/hydrology/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,11 @@ def __parse_file(self, file: bytes, station_id: str, schema: dict) -> pl.DataFra
pl.col("station_id"),
pl.col("date"),
pl.concat_str(
[
exprs=[
pl.col("extremity").map_dict({"1": "minimalna", "2": "średnia", "3": "maksymalna"}),
pl.col("parameter"),
],
" ",
separator=" ",
).alias("parameter"),
pl.col("value"),
)
Expand Down

0 comments on commit 399d955

Please sign in to comment.