pandas and NumPy 3 · Selecting and filtering
Select columns
Pick one column as a Series, or several as a DataFrame.
df["name"]
df[["name", "age"]]
Official pandas and NumPy 3 documentation
More selecting and filtering commands
- Filter rows
- Filter with a string expression
- Select by label
- Select by position
- Match a list of values
- Sort rows
All selecting and filtering commands · pandas and NumPy 3 cheatsheet