Hi,
I’m struggling to find a function that I can use to search for two separate values in the same column e.g. If I want to define a second column that counts the number of times in an event t_pdg == 12 AND t_pdg==11
is also in the column how would I go about this. So far I’ve been using
df=df.Define(" both_true","( t_pdg[t_pdg ==12].size() && t_pdg[t_pdg==11].size()")
. The logic on this though seems slightly off
Any help would be very appreciated!
Please read tips for efficient and successful posting and posting code
Please fill also the fields below. Note that root -b -q
will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug
from the ROOT prompt to pre-populate a topic.
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided