08 - pandas DataFrames

Опубликовано: 16 Май 2026
на канале: Aaron J Newman
864
11

We learn about pandas DataFrames, a powerful tool for working with tabluar data in Python.

Summary:
pandas DataFrames are a powerful way of storing and working with tabular (row/column) data
pandas columns and rows can have names
pandas row names are called indexes which are numeric by default, but can be given other labels
Use the `.iloc[]` method with a DataFrame to select values by integer location, using [row, column] format
Use the `.loc[]` method with a DataFrame to select rows and/or columns, using named slices
Use `:` on its own to mean all columns or all rows
Result of slicing can be used in further operations
Use comparisons to select data based on value
Select values or `NaN` using a Boolean mask
use split-apply-combine to derive analytics from groupings within a DataFrame

From the course, NESC 3505 Neural Data Science, by Aaron J Newman, Dalhousie University, Halifax, NS, Canada.

All course videos are here: https://bit.ly/neural_data_science_vi...

Textbook is available here: http://neuraldatascience.io

This lesson adapted from Software Carpentries: http://swcarpentry.github.io/python-n...