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

The fundamental type - Index

This type of index is the most generic and represents an ordered and sliceable set of values. The values that it contains must be hashable Python objects. This is because the index will use this hash to form an efficient lookup of values associated with the value of that object. While hash lookup is preferred over linear lookup, there are other types of indexes that can be further optimized.

It is common that the columns index will be of this generic type. The following code demonstrates the use of this index type as the columns of the DataFrame.

While this type of index generally works well for alphanumeric column ...

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