NumPy · Lesson 3.2 · Pro

Unique values and counts

Find the distinct values, count how often each appears, and group numbers into ranges.

In this lesson

  1. Distinct values with np.unique
  2. Counting each value
  3. Counting small whole numbers with bincount
  4. Group into ranges with np.histogram