I want to get the sum of a column based on whether it matches multiple strings. For example,
pd.DataFrame({'key': ['b', 'b d', 'a', 'c t', 'a', 'b p'], 'data1': range(6)})
I want to be able to get the sum for data1 column IF the strings in the key column contain 'b' and 'c'. The sum in this case would be 9.