Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches

Detailed Description

View in nbviewer Open in SWAN
Simple RDataFrame example in Python.

This tutorial shows a minimal example of RDataFrame. It starts without input data, generates a new column x with random numbers, and finally draws a histogram for x.

import ROOT
# Create a data frame with 100 rows
rdf = ROOT.RDataFrame(100)
# Define a new column `x` that contains random numbers
rdf_x = rdf.Define("x", "gRandom->Rndm()")
# Create a histogram from `x` and draw it
h = rdf_x.Histo1D("x")
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
Date
September 2021
Author
Enric Tejedor (CERN)

Definition in file df000_simple.py.