Loading [MathJax]/extensions/tex2jax.js
ROOT
Version v6.20
master
v6.34
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
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
tdf = ROOT.ROOT.RDataFrame(100)
15
16
# We now fill it with random numbers
17
ROOT.gRandom.SetSeed(1)
18
tdf_1 = tdf.Define(
"rnd"
,
"gRandom->Gaus()"
)
19
20
# And we write out the dataset on disk
21
tdf_1.Snapshot(
"randomNumbers"
,
"df008_createDataSetFromScratch_py.root"
)
22
tutorials
dataframe
df008_createDataSetFromScratch.py
ROOT v6-20 - Reference Guide Generated on Fri Apr 1 2022 00:23:38 (GVA Time) using Doxygen 1.9.4