# Picking Rows and Columns

Picking Rows and Columns: Picking Rows and Columns: loc and iloc.

Updated: November 19, 2026

1. [Picking Rows and Columns: loc and iloc](https://www.ask-codey.com/lessons/pandas-loc-and-iloc) (Apprentice): Square brackets pick columns by name, set_index makes a column such as sku the row labels, loc picks rows and columns by those labels (a label slice includes its end), and iloc picks them by position, counting from 0 (a position slice stops before its end).

Source: https://www.ask-codey.com/courses/python-data-analysis/topics/data-selecting
