Published on
· Data Independent

Selecting Data Pandas loc vs iloc | df.loc[] df.iloc[]

This post is auto-generated from a public YouTube video for personal study notes. It is not an endorsement. The transcript is machine-derived and may contain errors; refer to the original video for accuracy.

About this video

When it comes to selecting data on your DataFrame, Pandas loc and iloc are two top favorites. They are quick, fast, and easy to read when reviewing code later.

Pandas loc will select data based off of the label of your index (row/column labels) whereas Pandas iloc will select data based off of the position of your index (position 1, 2, 3, etc.)

Loading transcript…