Reading JSON from a file?

前端 未结 7 1847
無奈伤痛
無奈伤痛 2020-11-22 03:33

I am getting a bit of headache just because a simple looking, easy statement is throwing some errors in my face.

I have a json file called strings.json like this:

7条回答
  •  自闭症患者
    2020-11-22 03:59

    You can use pandas library to read the JSON file.

    import pandas as pd
    df = pd.read_json('strings.json',lines=True)
    print(df)
    

提交回复
热议问题