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

Integer index labels using Int64Index and RangeIndex

The Int64Index represents an immutable array of 64-bit integers that map to values. Until more recent versions of pandas, this was the default index type when an index was not specified or integers are used as seen in the following code snippet:

Using this index, lookups of rows in the DataFrame are highly efficient as they are performed using a contiguous in-memory array.

Recent versions of pandas added the RangeIndex as an optimization of Int64Index. It has the ability to represent an integer-based ...

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