Move from Excel to Python with Pandas Transcripts
Chapter: Intro to Pandas
Lecture: Concept: Selecting rows and columns

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Here's a reference you can use to refer back to to make sure you understand how to use loc and iloc.
0:06 The first thing to keep in mind is that it's always rows then columns, and when you want to select a row, you can use a colon to select all the rows.
0:13 You can also provide a list, or you can slice the rows, and you could do a similar thing. From a column perspective, you can select all the columns,
0:21 a list of columns or slice the columns I loc is similar, but you can use indexes instead so you can select all rows or a subset of
0:31 rows. But when you select your columns, you can use a numerical value in future. Sections will talk about Boolean indexing using these same formats,
0:40 and it's really powerful way and the way that I normally will sub select the data in my data frames

Talk Python's Mastodon Michael Kennedy's Mastodon