Calling dict() on some ak.Array object #798
Unanswered
HenryDayHall
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I don't know what you want Are you wanting to turn the Awkward Array into Python lists and dicts? That's ak.to_list or >>> pets
<Array [{dog: [[1, 2], [5]]}] type='1 * {"dog": var * var * float64}'>
>>> pets.tolist()
[{'dog': [[1.0, 2.0], [5.0]]}] |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So sometimes calling
dict(ak_array)
gives an error.It is more than possible I have done something odd with my packages, so let me know if you don't reproduce it. Also apologies if it's already been reported.
Side note for future readers; if you got here with the same goal I had then you wanted the list of column names, it's
ak.fields(pets)
.Beta Was this translation helpful? Give feedback.
All reactions