Skip to content

Commit 2131316

Browse files
committed
wrong rocks
1 parent eb2b5d3 commit 2131316

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

dataretrieval/waterdata/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,11 +1439,11 @@ def get_reference_table(
14391439
# Give ID column a more meaningful name
14401440
if collection.endswith("s"):
14411441
return_list = return_list.rename(
1442-
columns={"id": f"{collection[:-1].replace("-", "_")}_id"}
1442+
columns={"id": f"{collection[:-1].replace('-', '_')}_id"}
14431443
)
14441444
else:
14451445
return_list = return_list.rename(
1446-
columns={"id": f"{collection.replace("-", "_")}_id"}
1446+
columns={"id": f"{collection.replace('-', '_')}_id"}
14471447
)
14481448

14491449
# Create metadata object from response

dataretrieval/waterdata/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ def _arrange_cols(
674674
# If the arbitrary id column is returned (either due to properties
675675
# being none or NaN), then move it to the end of the dataframe, but
676676
# if part of properties, keep in requested order
677-
if extra_id_col and properties is None or all(pd.isna(properties)):
677+
if extra_id_col and (properties is None or all(pd.isna(properties))):
678678
id_col_order = [col for col in df.columns if col not in extra_id_col] + list(extra_id_col)
679679
df = df.loc[:, id_col_order]
680680

0 commit comments

Comments
 (0)