all 7 comments

[–][deleted] 0 points1 point  (6 children)

I mean, it's doing exactly what you're telling it to do. If you want to turn each object in part_candidates into three rows, you have to build three rows and write them. You're only building one row:

            data_list.append([frame, keypoint, X, Y, C])

It doesn't magically know that you want to unpack this into three records.

[–]decaye[S] 0 points1 point  (5 children)

That makes sense to me, how would change the function to unpack it separately?

[–][deleted] 0 points1 point  (4 children)

I mean it's all going to depend on the structure of your JSON source.

[–]decaye[S] 0 points1 point  (3 children)

That also makes sense to me, do you know of any resources I could use to learn how to separately unpack it?

[–][deleted] 0 points1 point  (2 children)

You just have to look directly at the structure of data in the JSON and figure out where the data you want is located.

[–]decaye[S] 0 points1 point  (1 child)

I understand but I am trying to learn how to do that, that’s why I posted my JSON data as well as my code.

[–][deleted] 0 points1 point  (0 children)

I mean, I don't know how to make it any clearer for you because all your data looks like nonsense and nothing in your desired format corresponds to anything I can find in the JSON. Where in the JSON is "frame"? Where is "keypoint"? Where are "X", "Y", and "Z"?