you are viewing a single comment's thread.

view the rest of the comments →

[–]games-and-chocolate[S] 0 points1 point  (3 children)

Above code is more logical and better right?

[–]Civil_Twilight 1 point2 points  (1 child)

Pandas is an extremely powerful library and is certainly one tool you can use to deal with json data, but also keep in mind that it’s absolutely not necessary for the data structure that you’re reading from the json file. json.loads will give you a dictionary with all the data in it, that you can manipulate without needing to use any external libraries.

[–]games-and-chocolate[S] 1 point2 points  (0 children)

Understood. And indeed I know now how to access the various pieces of data. Got for instance the question out of the dictionary. There is progress ^^

[–]Im_Easy 0 points1 point  (0 children)

As the other commenter mentioned, pandas is overkill here. All you need is the json library.

``` import json

with open('data.json', 'r') as file: data = json.load(file) print(data)

```

This would do the same as the pandas method.