Closed zhangzc11 closed 5 years ago
Thanks for the clear reproducer, it will be fixed in 0.7.0
which is currently working its way through the pipeline.
The order is still ambiguous if wildcards or expansions are used, for example asking for ['MET_*', 'EventWeight', 'MET_px']
will now result in ['EventWeight', 'MET_px', 'MET_py']
(defined columns first, wildcards afterwards). Is this a problem for your use case?
I recently realized that when constructing DataFrame from root_pandas.read_root, the index of the columns get randomly shuffled. Try the following:
wget http://scikit-hep.org/uproot/examples/HZZ.root
here is the test.py code:
So if you run this test.py code multiple times, you will see that the print out result from root_pandas DataFrama (df) changes; but the DataFrame from uproot (df2) is always the same (and follows the order of TBranch name lists).
root_pandas version i used: v0.6.1