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

**URL:** <https://root-forum.cern.ch/t/attributeerror-type-object-rdf-has-no-attribute-fromcsv/54899>\
**Category:** Newbie\
**Tags:** rdataframe\
**Created:** [May 17, 2023, 7:20am UTC](https://root-forum.cern.ch/t/attributeerror-type-object-rdf-has-no-attribute-fromcsv/54899 "2023-05-17T07:20:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ufuk\_Tok](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ufuk_tok/32/35802_2.png) [@Ufuk\_Tok](https://root-forum.cern.ch/u/Ufuk_Tok)\
**Post date:** [May 17, 2023, 7:20am UTC](https://root-forum.cern.ch/t/attributeerror-type-object-rdf-has-no-attribute-fromcsv/54899/1 "2023-05-17T07:20:07Z")

</div>

* * *

_ROOT Version:_ 6.26/04  
_Platform:_ lxplus  
_Compiler:_ Not Provided

* * *

Hi.

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 17, 2023, 7:37am UTC](https://root-forum.cern.ch/t/attributeerror-type-object-rdf-has-no-attribute-fromcsv/54899/2 "2023-05-17T07:37:18Z")

</div>

ROOT 6.26 → `ROOT::RDF::MakeCsvDataFrame`

---

<div class="post-metadata">

**Author:** ![pgraveli](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/57b2e6/32.png) [@pgraveli](https://root-forum.cern.ch/u/pgraveli)\
**Post date:** [December 8, 2023, 2:23pm UTC](https://root-forum.cern.ch/t/attributeerror-type-object-rdf-has-no-attribute-fromcsv/54899/3 "2023-12-08T14:23:44Z")

</div>

Recently I tried using the function `ROOT::RDF::FromCSV` and had the same error, being corrected by the comment above. Later, having a similar error with `ROOT::RDF::FromSqlite` it was not corrected when changing for the documented version of `ROOT::RDF::MakeSqliteDataFrame`.

I’m using JupyROOT 6.26/10.

What can be done to fix this issue?  
Thank you for your help.
