Skip to content

Glossary: pandas Beyond the Basics

extract

Also written: .str.extract(), str.extract

A `.str` method that returns what the group in a regular expression captured, for every value. Rows where the pattern isn't found get NaN.

Where the book teaches it

Related terms

Capture groupRegular expression (regex)