AI engineering glossary · NumPy pandas visualization

What is reset_index?

reset_index (also called set_index): A pandas method that turns the current index into an ordinary column and replaces it with a plain 0, 1, 2 counter. It is commonly needed after groupby or filtering, when the labels are no longer useful as an index.

Level: beginnerTopic: NumPy pandas visualization

reset_index: an example

df.groupby('city')['sales'].sum().reset_index() returns a normal table with city and sales columns.

Related terms

More NumPy pandas visualization terms

Where you learn it

reset_index 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.