I am a total beginner and am currently trying to learn python. Right now objects is my biggest issue. I have a simple project where I request an REST api und the response is json and looks a bit like this:
{
"x": 1,
"y": 2,
"z": [
{"a": 1, "b": 1, "c": 1}
{"a": 3, "b": 4, "c": 5}]
}
Now I need something like this for my csv columns: for every item in z[]: a,b,c,x,y
I have several 1000 pages of response. How would you solve this? Right now I get objects in a single column. Using pandas to write to csv:
data = response.json()
df = pd.DataFrame(data)
df.to_csv("output.csv")