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

Explicit lookup by position with .iloc[]

Value lookup by position can be performed using .iloc[]. The following demonstrates using integers as parameters:

The following looks up by position, even though the index has integer labels:

Note that if you specify a location that does not exist (below zero, or greater than the number of items—one), then an exception will be thrown.

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