pandas · Lesson 2.3 · Pro

Filtering rows

Keep the rows you want with True/False masks, and combine conditions with &, | and ~.

In this lesson

  1. A mask keeps rows
  2. Combine with & and |
  3. Not: ~
  4. Count and share with masks