title: Randomly drop elements from pandas series, based on a condition
body: <p>I have a pandas series with ~150 million float elements. I am trying to randomly drop a 50% of all elements whose value lie between a specific range (say, between -0.1 and 0.1).</p>
  <p>Normally I would (1) create a dataframe from the series; (2) add a column with random numbers; (3) drop those rows that satisfy the first condition (between -0.1 and 0.1) and whose random number is in the lower 20th percentile. However, doing this saturates my PCs memory and won't work, so I am trying to find a way to do this directly from the series without much manipulation.</p>
  <p>For example, I have something like this (but much bigger in reality):</p>
  <pre><code>0            0.05
  1            -0.05
  2            0.03
  3            0.12
  4            0.03
  5            -0.2
  6            -0.05
  7            0.13
  8            -0.2
  9            0
  Length: 10, dtype: float64
  </code></pre>
  <p>And I am trying to drop randomly the 50% of all values between -0.1 and 0.1, which would give an output like this:</p>
  <pre><code>0            0.05
  3            0.12
  4            0.03
  5            -0.2
  6            -0.05
  7            0.13
  8            -0.2
  </code></pre>
  <p>Is there any way to do this directly from the series and without much manipulation?</p>
  <p>Thanks!!!</p>