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']]
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']]
or condition in pandas
df1 = df[(df.a != -1) & (df.b != -1)]
or condition in pandas
df2 = df[(df.a != -1) | (df.b != -1)]
select rows with multiple conditions pandas query
df.query('Salary_in_1000 >= 100 & Age < 60 & FT_Team.str.startswith("S").values')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us