O'Reilly logo

Learning pandas - Second Edition by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Ignoring the index labels

If you would like to ensure that the resulting index does not have duplicates and preserves all the rows, you can use the ignore_index=True parameter. This essentially returns the same result, except with the new Int64Index:

This operation also functions on concatenations.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required