

You may also want to drop any remaining columns with the data we parsed out.

Now you can view your main data frame, and you should see the new columns you created. ent_df = df.apply(pd.Series)ĭf = newĭf = new_b Your file may have more mentions per Tweet. new_df = df.apply(pd.Series)ĭf = normįor the ntions object, this was a bit more complex because the file I had up to 2 mentions per Tweet. I also renamed the new df columns to it add easier to add the columns to the primary data frame. As indicated in the medium article, you can do the merge right away, but I personally prefer to do it step by step to have more control. This is based on the “not so good solution” from this article. I started with reference_tweets and separated this further. I used pd.json_normalize to create the data frame. I also parsed out the data object in the payload to make it easier for this example. data = json.load(open('json_example.json')) I did this slightly differently from you, but I think the outcome is the same. I downloaded the data from postman as you did and saved it to a JSON file.

I first imported JSON and pandas in my notebook. Hi wanted to follow up here since I figured out how to get this parse out and get this to work.
