Skip to content

Tag: json

ValueError: All arrays must be of the same length

can someone help with the error with converting a json file to a data frame pls I’m trying to convert the JSON text file to a data frame but get the array same length error. I have tried double [[]] around the ‘data’ but still doesn’t work. The text file is at https://stackoverflowtez.…

How to group a json by a nested key using Python?

Lets say we have a json object in Python: What is the most efficient way to group this data by city, so that we end up with a json in which we group the data by city such that we end up with a json as: … in which the content of the people are included in “people” key. Thanks!

Seach in JSON with variable depth and structure

I have some highly nested JSON files I need to work with. A short example: I would now like to read all names from the JSON file and write them into a list. This is not particularly difficult if the JSON file has a fixed structure. However, my JSON files have a variable structure and variable depth. Sometimes…

How do i delete an element of a json object with python?

I’m trying to delete elements from _notes that have _type as 1, but i keep getting an error and I’m not sure what it means, nor do I know how to fix it.. can anyone help me? My trimmed JSON: My python script: Error: Traceback (most recent call last): File “C:programmingpythontrain_one_handru…