Replies: 3 comments 4 replies
-
P.S. afaik the relative documentation is here, where it says the content does not exist yet. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the spam. I solved by creating a new thing
It is somehow inconvenient though, it would be great if down the line there were dedicated functions that trivially do this. |
Beta Was this translation helpful? Give feedback.
-
I moved this to the Awkward Array repo, since this question is about manipulating arrays, not getting data from Uproot. You mention padding arrays. You have a solution, but in case it's useful, the usual way is through ak.pad_none and ak.fill_none. Let's leave these Discussions open, too, so that they'll be helpful to more people in the future. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I need to read a tree with 39 columns with a mix of int, bool, float, and lists of ints and floats, and then I need to pad everything to the maximum length of any of the dimensions. Finally, I have to write that in to an HDF5 file.
After a lot of struggling (it seems it is not trivial to mix data types like this), I arrived to a solution.
Now I would like to extract three columns from my padded array, and change their names. Before I was forced to use awkward arrays instead of pandas dataframes by the procedure above, I was doing
However, now that
branches
is an awkward array the above code doesn't work anymore (no membercopy
).I tried variations of:
but I keep getting complaints that named arrays are unmodifiable, so I cannot change column names.
How can I change column names?
Thank you very much in advance!
Cheers,
Pietro
Beta Was this translation helpful? Give feedback.
All reactions