Working with std::string in RDataFrame in python

How do work with strings and RDataFrame? Example (python):

df.Define("seed", "\"abd\"").Snapshot("test", "test.root")
Error in <TTree::Branch>: The pointer specified for seed is not of a class known to ROOT
RDataFrame::Run: event loop was interrupted
Error in <TTree::Branch>: The pointer specified for seed is not of a class known to ROOT
RDataFrame::Run: event loop was interrupted

while this works:

df.Define("seed", "std::string(\"abd\")").Snapshot("test", "test.root")

ROOT 6.24/04

Hi @wiso ,
yes that’s it, RDataFrame does not support columns of array pointer type (including const char *), the solution is to use objects (e.g. std::string) instead.

Cheers,
Enrico

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