Skip to content

Commit

Permalink
[df][nfc] Update documentation of default colums with a Take example
Browse files Browse the repository at this point in the history
Fixes #16487
  • Loading branch information
dpiparo committed Dec 6, 2024
1 parent dc1ac98 commit df1b465
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tree/dataframe/src/RDataFrame.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1203,8 +1203,9 @@ auto h = d1.Filter([](int b1, int b2) { return b1 > b2; }) // will act on "b1" a
// just one default column this time
RDataFrame d2("myTree", "file.root", {"b1"});
auto min = d2.Filter([](double b2) { return b2 > 0; }, {"b2"}) // we can still specify non-default column lists
.Min(); // returns the minimum value of "b1" for the filtered entries
auto d2f = d2.Filter([](double b2) { return b2 > 0; }, {"b2"}) // we can still specify non-default column lists
auto min = d2f.Min(); // returns the minimum value of "b1" for the filtered entries
auto vals = d2f.Take<double>(); // return the values for all entries passing the selection as a vector
~~~
\anchor helper-cols
Expand Down

0 comments on commit df1b465

Please sign in to comment.