Skip to content

Commit

Permalink
rename extra columns to match hydrotools canonical snake casing
Browse files Browse the repository at this point in the history
  • Loading branch information
jarq6c authored and aaraney committed May 19, 2023
1 parent c8235e3 commit 64ea1d7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion python/nwis_client/src/hydrotools/nwis_client/iv.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,15 @@ def empty_df_warning_helper():
"series",
]
if include_expanded_metadata:
output_columns += expanded_columns + ["latitude", "longitude"]
expanded_column_mapping = {
"siteTypeCd": "site_type_code",
"hucCd": "huc_code",
"countyCd": "county_code",
"stateCd": "state_code",
"siteName": "site_name"
}
dfs = dfs.rename(columns=expanded_column_mapping)
output_columns += list(expanded_column_mapping.values()) + ["latitude", "longitude"]
return dfs[output_columns]

def get_raw(
Expand Down

0 comments on commit 64ea1d7

Please sign in to comment.