merge json results and use properties as pandas columns


I have a Json and I’d like to merge the result objects together and have a dataframe that uses "properties" as columns (ID, Title, Site, Last edited time, Link, Status).

Here is what I tried:

    import pandas as pd
    import json
    data = json.load(open('db.json',encoding='utf-8'))
    df = pd.DataFrame(data["results"])
    df2 = pd.DataFrame(df["properties"])


Here is the json:

Here is the result I am expecting:

                Site          Last edited time                       Link Status ID       Title
0  2023-01-16T20:44:00.000Z   None  1      page 0
1  2023-01-16T20:44:00.000Z   None  1      page 1

>Solution :

You can use apply pd.Series on properties:

df2 =

Leave a Reply Cancel reply