ROOT Version: 6.26/04
Compiler: Not Provided
I am trying to convert a CSV file to a root file by using RDataFrame.FromCSV. However, it gives an attribute error. My simple code is here:
import ROOT import os fileName="/afs/cern.ch/user/u/utok/public/230511_D2_Ch7.csv" df = ROOT.RDF.FromCSV(fileName) rootfileName = "230511_D2_Ch7.root" treeName = "myTree" df.Snapshot(treeName,rootfileName)
When I run the code, it gives this error;
AttributeError: <namespace cppyy.gbl.ROOT.RDF at 0x508f470> has no attribute ‘FromCSV’. Full details:
type object ‘RDF’ has no attribute ‘FromCSV’
‘ROOT::RDF::FromCSV’ is not a known C++ class
‘FromCSV’ is not a known C++ template
‘FromCSV’ is not a known C++ enum
I checked the forum for discussions about similar issues, but I couldn’t find a related one.
Thanks in advance.