An app API returns nested records. Flatten them into a table with pd.json_normalize, so the nested keys become columns like device.os.
Store the number of users per `device.os` in result (value_counts()).
import pandas as pd
records = [
{"user": "u1", "device": {"os": "android", "version": "14"}, "plan": "free"},
{"user": "u2", "device": {"os": "ios", "version": "17"}, "plan": "paid"},
{"user": "u3", "device": {"os": "android", "version": "13"}, "plan": "paid"},
{"user": "u4", "device": {"os": "android", "version": "14"}, "plan": "free"},
]Store your final answer in a variable named result.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.