Skip to content

Commit

Permalink
(future warning fix): wrapping pd.read_json arg in StringIO to suppre…
Browse files Browse the repository at this point in the history
…ss pandas future warning about not passing a str (#112)
  • Loading branch information
mnfienen authored Sep 25, 2023
1 parent 6b6ad6a commit f6d18aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataretrieval/nwis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ def _read_json(json):

# read json, converting all values to float64 and all qualifiers
# Lists can't be hashed, thus we cannot df.merge on a list column
record_df = pd.read_json(record_json,
record_df = pd.read_json(StringIO(record_json),
orient='records',
dtype={'value': 'float64',
'qualifiers': 'unicode'},
Expand Down

0 comments on commit f6d18aa

Please sign in to comment.