the connection to probability is that have a data frame sample space and we would like to find a subset of that space. A data. frame method was written for isin that simply applies the function to each row of the data frame. we can see the method in action with the following: