Skip to content
Errors
Commands
Flags
Config
Cheat sheets
Changes
Compat
Codes
Compare
Glossary
Search
Ctrl K
Browse
Error Messages
Commands
Flags & Options
Config Reference
Cheat Sheets
Version Changes
Compatibility
Codes & Tables
X vs Y
Glossary
All tools
Home
X vs Y
pandas
Data & ML
pandas X vs Y
Python data analysis library.
All pandas pages
pandas loc vs iloc: label-based vs position-based selection
loc selects rows and columns by label and includes the end of a slice; iloc selects by integer position and excludes it. Cases where they return different rows.
Esc