I have a dataframe where each row contains a list of strings. I have written a function that performs a Bernoulli-type trial on each string, where with some probability (0.5