Replies: 2 comments
-
Uproot 4.x tries to "explode" ragged data, so that an array of variable numbers of particles per event are turned into a DataFrame with numbers in the cells and MultiIndex rows, indicating the nesting, similar to ak.to_dataframe. But this isn't always possible. If you are trying to read, for instance, both muons and electrons, the numbers of particles in these two collections are not in general (or even usually) equal to each other, so there's no single MultiIndex that they can both expand to. In that case, Uproot 4.x produces a tuple of DataFrames, one for each particle type. Uproot 5.x, however, uses Akimbo to put lists of numbers into each cell (instead of individual numbers) with a normal index. That's because dataframe libraries are starting to use Arrow format, rather than Python lists, and it's not a big performance loss to do so. So you have two options: 1. without installing any new packages, select (with |
Beta Was this translation helpful? Give feedback.
-
Hi Jim ! I would prefer for now method 2.
Defaulting to user installation because normal site-packages is not writeable when I try to install any newer version of uproot. I am getting a lot of warnings for other packages. I am working inside swan. I don't know is it solely related now to uproot issue or I should ask somewhere else. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hi developers !
I am creating a pandas dataframe but issue is its giving me tuple each time.
AttributeError Traceback (most recent call last)
/tmp/ipykernel_557/1180174254.py in
2 import pandas as pd
3
----> 4 dfall.columns
AttributeError: 'tuple' object has no attribute 'columns'
Here is the code that I run for making pandas dataframe.
Thanks,
Sadhana
Beta Was this translation helpful? Give feedback.
All reactions