Skip to content

Glossary: pandas Beyond the Basics

np.select

Also written: numpy select

A NumPy function that takes a list of conditions and a matching list of results, giving each row the result of the first condition it meets, or `default=` if none. List the most specific condition first.

Where the book teaches it

Related terms

np.where