i have some dataset df
and i need check rows only with special values of strings in name
column
so i need make df[df.name.str.contains('John', regex=True)]
this will outputs me df with John names
i can make logic OR like df[df.name.str.contains('John|James', regex=True)]
this will make me outputs df with John or James names
but how i can make contains with two values at the same time? for example we have name like James John Williams, and i need return only this row (string need contains John AND James)?