ValueError when using pandas.read_json

I had the same error message, and I solved it by using an absolute path.

import os
basePath = os.path.dirname(os.path.abspath(__file__))
df = pandas.read_json(basePath + '/ut1.json', orient="records", dtype={"A":str, "B":list})

That worked for me!

Leave a Comment