Skip to content

Commit

Permalink
🩹 Accept corrections
Browse files Browse the repository at this point in the history
Wupperverband seems to update recent values on occasion
  • Loading branch information
jh0ker committed Nov 16, 2023
1 parent 25e5101 commit 6486306
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ddj_cloud/scrapers/talsperren/talsperren.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ def _get_base_dataset():
else:
df = df_new

# Deduplicate
df = df.drop_duplicates(subset=["federation_name", "name", "ts_measured"], keep="first")
# Deduplicate, but keep new data if there are duplicates
df = df.drop_duplicates(
subset=["federation_name", "name", "ts_measured"],
keep="last",
)

# Sort
df = df.sort_values(["federation_name", "name", "ts_measured"])
Expand Down

0 comments on commit 6486306

Please sign in to comment.