Uproot

Latest version: v5.6.0

Safety actively analyzes 714772 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 30 of 57

3.4.6

Fixed 232, in which Double32 couldn't be converted to a flat Pandas DataFrame.

3.4.5

PR 226, 229, and issue 227

* loosening the definition of "compatible interpretations" across files in `uproot.iterate`
* fixed `tree.pandas.df(flatten=True)` for jagged arrays that contain lists
* corrected handling of truncated Double32

3.4.4

Faster `TTree.pandas.df(flatten=True)` provided by PR 223.

One capability that was _lost_ was reading branches with different jagged structure into the same DataFrame with `flatten=True`. For instance, a TTree containing different numbers of electrons and muons can't be simultaneously flattened. The old code managed to do this with an [outer join](https://en.wikipedia.org/wiki/Join_(SQL)#Full_outer_join) on DataFrames. We no longer do this in the `TTree.pandas.df` code; instead, we broadcast JaggedArrays, which is not just faster, it's also more correct. Does it make sense to put the first electron and the first muon in the same row, then the second electron and the second muon in another row, where the two sets have different sizes in each event? (The shorter of the two then has to be padded with `NaN`.) This joint row-membership doesn't correspond to any property the second electron and second muon share.

Now there's a ValueError warning you if you try to do this. You can encounter this error rather easily by not specifying branches—implicitly saying you want all branches from a TTree, which may contain incompatible branches. Remember that you can use glob patterns to ask for all branches satisfying a name pattern.

If you really do want to mix different cardinalities in the same DataFrame, you can explicitly do an outer join in Pandas:

python
muons = tree.pandas.df("Muon_*", flatten=True)
electrons = tree.pandas.df("Electron_*", flatten=True)
muons.join(electrons, how="outer")


You can also choose to _not_ flatten the DataFrame, which puts no constraints on the structure of the contents (but is less useful if you have a lot of jagged data).

3.4.3

Purely a touch-up to the PyPI page.

3.4.2

Try to fix PyPI page rendering and also fix another test warning (unclosed file).

3.4.1

Fix a Python 3.7 warning (`collections` vs `collections.abc`) and do a first full test of the new testing/deployment system.

Page 30 of 57

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.