RDataFrame::Take in PyROOT

ROOT Version: 6.12/06
Platform: Linux
Compiler: gcc 6.4.0

In C++, I can do something like this:

ROOT::RDataFrame d("mytree", "myfile");
auto mybranchVec = d.Take<double>("mybranch");

Is there an equivalent to this in PyROOT? There isn’t a corresponding example in $ROOTSYS/tutorials/dataframe. I’m aware of the difficulty in binding C++ STL structures in Python, and it wouldn’t surprise me if Take() isn’t available in PyROOT yet, but I thought I’d ask in case I missed something.

PyROOT can only handle pre-instantiated free function templates. It’s moderately better for templated methods, but both are still vastly inferior to what cppyy master provides, which handles this just fine (and even handles variadic templates). Note that it’s not enough for PyROOT to move to cppyy master in this case, since there are also a few patches needed in ROOT/meta.

All should arrive in due time, just apply pressure upstream. :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.