np.where multiple conditions pandas code example

Example 1: select rows with multiple conditions pandas query

df.loc[(df['Salary_in_1000']>=100) & (df['Age']< 60) & (df['FT_Team'].str.startswith('S')),['Name','FT_Team']]

Example 2: how to add three conditions in np.where in pandas dataframe

import numpy as np
idx = np.where((df['Salary_in_1000']>=100) & (df['Age']< 60) & (df['FT_Team'].str.startswith('S')))

Example 3: select rows with multiple conditions pandas query

df.query('Salary_in_1000 >= 100 & Age < 60 & FT_Team.str.startswith("S").values')