This tutorial shows how to use the Display action
{
unsigned long long y = 1;
double w = 1;
double z = 1;
auto d = df.Define(
"y", [&
y]() {
return y *= 100; })
.Define("x",
return std::vector<int>({
x++,
x++,
x++,
x++});
})
.Define("w", [&w]() { return w *= 1.8; })
.Define("z", [&z]() {
z *= 1.1;
return std::vector<std::vector<double>>({{z, ++z}, {z, ++z}, {z, ++z}});
});
auto d2 =
d.Display({
"x",
"y"});
std::cout << "The following is the representation of all columns with the default nr of entries" << std::endl;
d1->Print();
std::cout << "\n\nThe following is the representation of two columns with the default nr of entries" << std::endl;
d2->Print();
}
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
The following is the representation of all columns with the default nr of entries
y | x | w | z |
100 | 1 | 1.8000000 | { 1.1000000, 2.1000000 } |
| ... | | ... |
| 4 | | { 3.1000000, 4.1000000 } |
10000 | 5 | 3.2400000 | { 4.5100000, 5.5100000 } |
| ... | | ... |
| 8 | | { 6.5100000, 7.5100000 } |
1000000 | 9 | 5.8320000 | { 8.2610000, 9.2610000 } |
| ... | | ... |
| 12 | | { 10.261000, 11.261000 } |
100000000 | 13 | 10.497600 | { 12.387100, 13.387100 } |
| ... | | ... |
| 16 | | { 14.387100, 15.387100 } |
10000000000 | 17 | 18.895680 | { 16.925810, 17.925810 } |
| ... | | ... |
| 20 | | { 18.925810, 19.925810 } |
The following is the representation of two columns with the default nr of entries
x | y |
1 | 100 |
... | |
4 | |
5 | 10000 |
... | |
8 | |
9 | 1000000 |
... | |
12 | |
13 | 100000000 |
... | |
16 | |
17 | 10000000000 |
... | |
20 | |
- Date
- August 2018
- Author
- Enrico Guiraud, Danilo Piparo, Enric Tejedor Saavedra CERN, Massimo Tumolo Politecnico di Torino
Definition in file df024_Display.C.