Improve Pandas dataframe filtering speed
The concept to understand is that the conditional is actually a vector.  So, you can simply define the conditions, and then combine them logically, like:

condition1 = (df.col1 == 10) &amp; (df.col2 &lt;= 15)
condition2 = (df.col3 == 7) &amp; (df.col4 &gt;= 4)

# at this point, condition1 and condition2 are vectors of bools

df1 = df[condition1]
df2 = df[condition2 &amp; ~condition1]
df = df[~ (condition1 | condition2)]


This will be considerable faster as it only evaluates the conditional once.  Then it uses them to perform indexed lookup to create the new smaller dataframes.