Skip to main content

Data Selection & Indexing

loc and iloc: Precision Selection

0:00
LearnStep 1/4

Understanding loc

Label-Based Selection with loc

.loc[] selects data by labels (index and column names).

Basic Syntax

python

Important: loc slicing is INCLUSIVE

python