title: Pandas best way to subset a dataframe inplace, using a mask
body: <p>I have a pandas dataset that I want to downsize (remove all values under x). </p>
  
  <p>The mask is <code>df[my_column] &gt; 50</code></p>
  
  <p>I would typically just use <code>df = df[mask]</code>, but want to avoid making a copy every time, particularly because it gets error prone when used in functions (as it only gets altered in the function scope). </p>
  
  <p>What is the best way to subset a dataset inplace? </p>
  
  <p>I was thinking of something along the lines of<br>
  <code>df.drop(df.loc[mask].index, inplace = True)</code></p>
  
  <p>Is there a better way to do this, or any situation where this won't work at all?</p>