PARSING EXTREMELY NESTED JSON: USING PYTHON | RECURSION

preview_player
Показать описание
This is a video for those wanting to stop nightmares from 𝐧𝐞𝐬𝐭𝐞𝐝 𝐉𝐒𝐎𝐍 files. This is about as nested as you get in this video. We will use recursion to store all of the keys by index and save them as dot notation. This will keep every single level of keys and values. If you want to scare coworkers with your new found skills, watch this. Also, I left an easter egg for those who pay attention. Turn on the 🔔 notification

Join this channel to get access to perks:

➡ Twitter: @MrFuguDataSci
➡ Instagram: @mrfugudatascience

Code will be with the other 2 JSON files on Github

I will receive a small fee if you make a purchase on Zazzle of $25 or more

𝗣𝗿𝗶𝗻𝘁𝗶𝗳𝘆 𝗥𝗲𝗳𝗲𝗿𝗿𝗮𝗹 𝗢𝗳𝗳𝗲𝗿: I get a small commission if you make 3 purchases
𝐕𝐢𝐝𝐞𝐨𝐬 𝐘𝐨𝐮 𝐌𝐚𝐲 𝐀𝐥𝐬𝐨 𝐋𝐢𝐤𝐞:

Picture in video: Tilgenerpictures on Instagram

Music in scary clip: Youtube scary sounds

Music &. Intro Pic: Special Thanks

Pixabay: instagram (subscribe gif): @imotivationitas

Music: Oshóva - Tidal Dance on

#nestedjson, #parsejson,#mrfugudatascience
Рекомендации по теме
Комментарии
Автор

Here are 2 video that you may like with JSON data:

Join this channel to get access to perks:

Code will be with the other 2 JSON files on Github

𝐀𝐦𝐚𝐳𝐨𝐧 𝐀𝐟𝐟𝐢𝐥𝐢𝐚𝐭𝐞 𝐋𝐢𝐧𝐤𝐬: (I receive a small commission on purchases)
* Prices & Availability Subject to change







𝐕𝐢𝐝𝐞𝐨𝐬 𝐘𝐨𝐮 𝐌𝐚𝐲 𝐀𝐥𝐬𝐨 𝐋𝐢𝐤𝐞:


MrFuguDataScience
Автор

Holy moly! How could anyone have ever thought json was the answer?

GeneralTHC
Автор

This particular video of reading JSON is one of the best I've ever seen. Hope it gets more views. Thanks for your efforts to explain all this.

thisoldproperty
Автор

This is brilliant! I've been working to flatten and parse JSON files where the nested portions are bring read as text and therefore won't flatten using traditional Pandas/JSON/third-party packages. I can't call them by index either as they're not lists and calling by element position like [1] simply returns the position of a character within the text.

I'll try applying some of the methods you're demonstrated here and see if it anything works. JSON should not be this complicated!

Thanks for the videos and all your efforts mate!

christsciple
Автор

Hi Mr Fugu,
Thank you for the video, would you mind showing me the order to watch your JSON parsing videos cuz you have a few of them and I don't know where to start?

ihgnmah
Автор

Hey Mr Fugu! Love your videos and your teaching methods!

I've been trying to flatten a rather complex json file for days now, and output it to a csv and i simply can't figure it out. My CSV file works fine, if i past it into one of the online tools, but i can't seem to be able to write the script in python.

Some advice would be very much appreciated, as i'm rather stock.
I have the JSON i can send you asap.

larsbugge
Автор

I’m struggling with getting a json output from an api and converting it to a dataframe that preserves the hierarchy of the nested data. It’s a very large dataset with expected output of 15000 total rows. I got it done by looping over each row of parent data and json_normalizing each child row with recursion. However this takes a very long time. ChatGPT is suggesting to do this with dicts but I can’t get it to work! Note each row of data has a column called child that has the same columns as parent and can go down to four levels for each parent row.

Monduras
Автор

For this Video, I am subscribing your Channel 🙏

kirubababu
Автор

I am nowhere near this level yet but it's probably the solution I need. I'll come back in a few months lol

EspadaNeliel
Автор

Hi, Can you guide me on how would I load a really large json file?. I have a json file of 1.69 GB, I tried pyspark but it doesn't work, neither does pandas read_json but someone suggested me to use pickle and append lists I don't know how to do that... I searched over the internet but I don't know why I don't seem to find anything related to this... Help appreciated

ronaktiwari
Автор

Please show an example on read nested json data from API and stored it in DataFrame. Thank you.

jitsupayimphet
Автор

hi I have used this print_dict() function it's giving me output as "['.author.lastname', 'Doe']" am not able to print index values how to overcome it. BTW appreciate your efforts 👍👍

lqqgxoi
Автор

usually watch everything on incognito. Logged in just to like this video.

sajaldeyasi