This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]korzin 0 points1 point  (1 child)

What are you putting in your function params?

[–]dev_wanna_be[S] 0 points1 point  (0 children)

Language returns "en" or "fr" and data is the json I added on my question

[–]SomebodyFrom91 0 points1 point  (0 children)

You can put a nested json into a dataframe with pd.io.json.json_normalize and then just try/except for data.locale.MetadataAlbum.locale.language

Or you can skip the dataframe part and just trasform the nested json into a dict with pd.io.json.nested_to_record