Project 7: Menu JSON Loader
Data Analyst
Builds on these lessons
Current Task
Objective
pd.read_json() parses a JSON array of objects directly into a DataFrame, one row per object.
Task: parse a JSON string of menu items into a DataFrame and print it.
index.py
import pandas as pd
json_text = '[{"dish": "Pasta", "price": 12.5}, {"dish": "Salad", "price": 8.0}]'
menu = pd.read_json(json_text)
print(menu)
* Hint: Correct characters turn green, incorrect ones turn red.
Live Preview
🖼️
Verify your code to see the preview