ROOT
v6-22
Reference Guide
df008_createDataSetFromScratch.py
Go to the documentation of this file.
1
## \file
2
## \ingroup tutorial_dataframe
3
## \notebook -nodraw
4
## This tutorial shows how to create a dataset from scratch with RDataFrame
5
##
6
## \macro_code
7
##
8
## \date June 2017
9
## \author Danilo Piparo
10
11
import
ROOT
12
13
# We create an empty data frame of 100 entries
14
df =
ROOT.RDataFrame
(100)
15
16
# We now fill it with random numbers
17
ROOT.gRandom.SetSeed(1)
18
df_1 = df.Define(
"rnd"
,
"gRandom->Gaus()"
)
19
20
# And we write out the dataset on disk
21
df_1.Snapshot(
"randomNumbers"
,
"df008_createDataSetFromScratch_py.root"
)
ROOT::RDataFrame
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
Definition:
RDataFrame.hxx:42
tutorials
dataframe
df008_createDataSetFromScratch.py
ROOT v6-22 - Reference Guide Generated on Fri Apr 1 2022 11:53:17 (GVA Time) using Doxygen 1.9.4