Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
thodson-usgs committed Aug 28, 2024
1 parent f17bc64 commit 8a55c46
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions demos/nwqn_data_pull/retrieve_nwqn_streamflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ def map_retrieval(site):
parameterCd="00060",
)

# drop rows with missing values; neglect other 00060_* columns
df = df.dropna(subset=["00060_Mean"])

# by default, site_no is not in the index if a single site is queried
if "site_no" in df.columns:
index_name = df.index.names[0]
Expand All @@ -46,6 +43,8 @@ def map_retrieval(site):
print(len(df), "records retrieved")
# process the results
if not df.empty:
# drop rows with missing values; neglect other 00060_* columns
df = df.dropna(subset=["00060_Mean"])
# fill missing codes to enable string operations
df["00060_Mean_cd"] = df["00060_Mean_cd"].fillna("M")
df = df[df["00060_Mean_cd"].str.contains("A")]
Expand Down

0 comments on commit 8a55c46

Please sign in to comment.