Skip to content

Commit 7ab286c

Browse files
committed
dont use pd.read_json() because it can't handle NaN
pandas choosing not to be pragmatic and not support them, so I choose to use the standard library json module which does pandas-dev/pandas#12213
1 parent 3dd7a53 commit 7ab286c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

imgstore/stores.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,9 @@ def get_extra_data(self):
434434
for ext in ('.extra.json', '.extra_data.json'):
435435
path = chunk_path + ext
436436
if os.path.exists(path):
437-
dfs.append(pd.read_json(path, orient='record'))
437+
with open(path, 'rt') as f:
438+
records = json.load(f)
439+
dfs.append(pd.DataFrame(records))
438440
return pd.concat(dfs, axis=0, ignore_index=True)
439441

440442
def add_extra_data(self, **data):

0 commit comments

Comments
 (0)