0
嵌套JSON我有这个结构大熊猫创造了一个50MB的数据帧:阅读与大熊猫
指数 - {}字典 - INT - INT
当我尝试用pandas.read_json打开它()我得到:
pandas.core.common.PandasError: DataFrame constructor not properly called!
如果我只是用json.loads尝试()我得到:
ValueError: Expecting value: line 1 column 1 (char 0)
这是正常的文件,我保存了整个JSON开始与“所有”都逃脱?
谢谢!
不,它不是。你是怎么保存它的? –
我用“json.dump(dataframe.to_json(),outfile)” 此外,通过删除转义和“我解决了问题!谢谢! – tanke88
正确。问题是你保存它的方式。你应该像'open(myoutfilename,'w')那样做f:\ n f.write(dataframe.to_json())' –