AI engineering glossary · NumPy pandas visualization

What is str accessor?

str accessor (also called .str): The .str namespace on a pandas text column that applies string operations such as lower, strip, contains, replace and split to every value at once, skipping missing entries. It is the standard way to clean text columns without loops.

Level: intermediateTopic: NumPy pandas visualization

str accessor: an example

df['name'].str.strip().str.title() removes extra spaces and capitalises every name.

Related terms

More NumPy pandas visualization terms

Where you learn it

str accessor is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.