multiple conditions in dataframe python code example
Example 1: how to slicing dataframe using two conditions
# when you wrap conditions in parantheses, you give order
# you do those in brackets first before 'and'
# AND
movies[(movies.duration >= 200) & (movies.genre == 'Drama')]
Example 2: select rows with multiple conditions pandas query
df.query('Salary_in_1000 >= 100 & Age < 60 & FT_Team.str.startswith("S").values')