Reading JSON data into memory
When data is stored in JSON format, it's not always easy to load into a DataFrame. This is the case for the "nested_testing_scores.json" file. Here, the data will have to be manually manipulated before it can be stored in a DataFrame.
To help get you started, pandas has been loaded into the workspace as pd.
Latihan ini adalah bagian dari kursus
ETL and ELT in Python
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
def extract(file_path):
# Read the JSON file into a DataFrame, orient by index
return pd.____(file_path, orient="index")
# Call the extract function, pass in the desired file_path
raw_testing_scores = ____("____")
print(raw_testing_scores.head())