Comments (4)
I think this is not supported in root_pandas (but I may be incorrect!). To my knowledge, root_pandas actively prevents this case to happen (at least it was like that before AFAIK).
You can either use the flattening and have each entry in a single column or do what you really want by using root_numpy:
ar1 = root_numpy.root2array(filenames="rootfile.root",
treename='tree',
branches=['branch_with_array'])
df = pd.DataFrame(ar1)
(it used to work like that. If things changed in the mean time and this is not working anymore, let me know)
from root_pandas.
Ok it seems you are right, though I found this commit
28f2097#diff-f1a13e96d09db54e1548192242ca5ce4
in which it was decided to skip the non-scalar branches (it seems this functionality used to be supported before)
from root_pandas.
Yes, exactly. As said, it is (unfortunately!) actively suppressed in root_pandas as it is fully implemented in root_numpy (root_pandas uses internally root_numpy). Remove that piece of code and it will (presumably) work again.
That's why I still stick with root_numpy: it is too easy to convert to a DataFrame (see snippet above) and allows to convert arrays.
from root_pandas.
This is now supported in v0.3.1
.
from root_pandas.
Related Issues (20)
- ROOT 6.12 HOT 4
- Installation Instructions? HOT 1
- Problem installing root_pandas with anaconda HOT 11
- get_matching_variables is slow with many variables, columns
- Error if first file of the list does not contain the tree HOT 1
- Move to a BSD-3 license HOT 4
- IndexError when read_root used with chunksize returns an empty iterator HOT 1
- Recursive brace expansion is broken HOT 1
- Installing root_pandas on lxplus HOT 5
- cannot import root_pandas: Symbol not found HOT 7
- Change error message in to_root when two columns have the same name HOT 1
- root_pandas randomly shuffles index of columns HOT 1
- read_root not compatible to new pandas version HOT 2
- Cannot install root_pandas on Google colab HOT 3
- to_root and read_root fail on macOS HOT 8
- Error while reading file from http://opendata.cern.ch/record/10 HOT 6
- Reading file with chunksize now gives iterator error HOT 2
- Segmentation fault with ROOT 6.22/02 HOT 1
- Installing with pip 21.0.1 does not work, as pip tries to use wheel but doesn't fall back on setup.py install HOT 7
- Parallel processing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from root_pandas.