I'm trying to read a JSON file into a Pandas dataframe, in the following:
def read_JSON_into_dataframe( file_name ):
with sys.stdin if file_name is None else open( file_name, "r", encoding='utf8', errors='ignore' ) as reader:
df = pd.read_json( reader )
print( df.describe(), file = sys.stderr )
return df
However, I'm getting an error, for which to bottom stack frame is:
C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\json\json.py in _parse_no_numpy(self)
869 if orient == "columns":
870 self.obj = DataFrame(
--> 871 loads(json, precise_float=self.precise_float), dtype=None)
872 elif orient == "split":
873 decoded = {str(k): v for k, v in compat.iteritems(
ValueError: Trailing data
What does "trailing data" refer to? If it refers to some point in the JSON file, is there something I can do to figure out where that is and what's wrong with it?