AttributeError: type object 'RDF' has no attribute 'FromCSV'

ROOT Version: 6.26/04
Platform: lxplus
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


df = ROOT.RDF.FromCSV(fileName)

rootfileName = "230511_D2_Ch7.root"
treeName = "myTree"


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.

ROOT 6.26 → ROOT::RDF::MakeCsvDataFrame