1
The file is "grids.json", whose structure is:
{"students": [{"name": "Alan", "lastname": "Silva", "exam1": 50, "exam2": 80, "exam3": 91},
{"name": "Paula", "lastname": "Souza", "exam1": 95, "exam2": 98, "exam3": 99}]
}
Objective: To read the file "grades.json" and to show the data in tabular format, including an additional column with the average of each student to the right of the exam grades and an additional line with the average of the class in each exam.
I tried to use pandas but can’t do anything but read the JSON:
import pandas as pd
import numpy as np
dt = pd.read_json("grades.json")
print(dt)
Any idea?
What you mean by semi-structured?
– Laurinda Souza
It’s written in the first line of the answer: "Because the data in your JSON is semi-structured, or format is not compatible with the formats returned by the Dataframe.to_json method(),"
– Augusto Vasques
@ Augusto Vasques can help me in ? https://answall.com/questions/443657/extraindo-as-palavras-de-um-texto-longo-e-criando-estat%C3
– Laurinda Souza