Answers for "pandas drop rows with multiple conditions"

6

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']]
Posted by: Guest on June-20-2020
0

python drop rows with two conditions

df_new = [df[(df['col_1'] == 1.0) & (df['col_2'] == 0.0)].index]
df.drop(df_new,axis = 0 ,inplace= True)
Posted by: Guest on November-09-2021

Code answers related to "pandas drop rows with multiple conditions"

Python Answers by Framework

Browse Popular Code Answers by Language