Read JSON to pandas dataframe - ValueError: Mixing dicts with non-Series may lead to ambiguous ordering

后端 未结 3 1712
后悔当初
后悔当初 2021-02-12 14:50

I am trying to read in the JSON structure below into pandas dataframe, but it throws out the error message:

ValueError: Mixing dicts with non-Series may

3条回答
  •  抹茶落季
    2021-02-12 15:25

    If you just need the result part in a dataframe, then here is the code to help you.

    import json
    import pandas as pd
    data = json.load(open('json_file.json'))
    
    df = pd.DataFrame(data["result"])
    

提交回复
热议问题