# Convert numpy array to RDF with root v6.24/06

**URL:** <https://root-forum.cern.ch/t/convert-numpy-array-to-rdf-with-root-v6-24-06/54454>\
**Category:** Newbie\
**Tags:** python, rdataframe\
**Created:** [April 12, 2023, 12:14pm UTC](https://root-forum.cern.ch/t/convert-numpy-array-to-rdf-with-root-v6-24-06/54454 "2023-04-12T12:14:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrejL](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/andrejl/32/23243_2.png) [@AndrejL](https://root-forum.cern.ch/u/AndrejL)\
**Post date:** [April 12, 2023, 12:14pm UTC](https://root-forum.cern.ch/t/convert-numpy-array-to-rdf-with-root-v6-24-06/54454/1 "2023-04-12T12:14:26Z")

</div>

Does ROOT v6.24 support transofrmation of numpy arrays into RDF? Without caching trees in root files.

_ROOT Version:_ 6.24/06  
_Platform:_ Jupyter notebook

---

<div class="post-metadata">

**Author:** ![AndrejL](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/andrejl/32/23243_2.png) [@AndrejL](https://root-forum.cern.ch/u/AndrejL)\
**Post date:** [April 12, 2023, 12:20pm UTC](https://root-forum.cern.ch/t/convert-numpy-array-to-rdf-with-root-v6-24-06/54454/2 "2023-04-12T12:20:01Z")

</div>

In v6.24 it can be done using ROOT.RDF. MakeNumpyDataFrame(). [ROOT: PyROOT Namespace Reference](https://root.cern/doc/v624/namespacePyROOT.html#a3776768f539e39dce36e5f6d5c88ab06)

An example exists but only in v6.26. [ROOT: tutorials/dataframe/df032\_MakeNumpyDataFrame.py File Reference](https://root.cern/doc/v626/df032__MakeNumpyDataFrame_8py.html)

For newer versions of root there is another method: [ROOT: tutorials/dataframe/df032\_RDFFromNumpy.py File Reference](https://root.cern/doc/v628/df032__RDFFromNumpy_8py.html)

---

<div class="post-metadata">

**Author:** ![stevediaz](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/stevediaz/32/34558_2.png) [@stevediaz](https://root-forum.cern.ch/u/stevediaz)\
**Post date:** [September 28, 2023, 7:00am UTC](https://root-forum.cern.ch/t/convert-numpy-array-to-rdf-with-root-v6-24-06/54454/3 "2023-09-28T07:00:42Z")

</div>

Hello

ROOT (v6.24) primarily works with its own data structures and does not directly support transforming numpy arrays into RDF without caching trees in ROOT files. You typically need to convert ROOT data structures to pandas DataFrames to work with RDF and numpy. Check the latest ROOT documentation for any updates on this functionality.

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [September 30, 2023, 5:21pm UTC](https://root-forum.cern.ch/t/convert-numpy-array-to-rdf-with-root-v6-24-06/54454/4 "2023-09-30T17:21:44Z")

</div>

> [@stevediaz](#):
>
> You typically need to convert ROOT data structures to pandas DataFrames to work with RDF and numpy.

This is absolutely false
