Skip to content

Commit f6d18aa

Browse files
authored
(future warning fix): wrapping pd.read_json arg in StringIO to suppress pandas future warning about not passing a str (#112)
1 parent 6b6ad6a commit f6d18aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dataretrieval/nwis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ def _read_json(json):
11711171

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

0 commit comments

Comments
 (0)