- Learning pandas(Second Edition)
- Michael Heydt
- 63字
- 2025-02-22 14:06:23
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.