Logo ROOT   6.14/05
Reference Guide
Namespaces
df008_createDataSetFromScratch.py File Reference

Namespaces

 df008_createDataSetFromScratch
 

Detailed Description

View in nbviewer Open in SWAN This tutorial shows how to create a dataset from scratch with RDataFrame

import ROOT
# We create an empty data frame of 100 entries
tdf = ROOT.ROOT.RDataFrame(100)
# We now fill it with random numbers
ROOT.gRandom.SetSeed(1)
tdf_1 = tdf.Define("rnd", "gRandom->Gaus()")
# And we write out the dataset on disk
tdf_1.Snapshot("randomNumbers", "df008_createDataSetFromScratch.root")
Date
June 2017
Author
Danilo Piparo

Definition in file df008_createDataSetFromScratch.py.