Back to Course
Data Intelligence: NumPy & Pandas
Module 6 of 15
6. DataFrames
1. The Table
A DataFrame is a collection of Series sharing a common Index. Think of it as an In-Memory SQL Table or a super-charged Excel sheet.
2. Access: Loc vs Iloc
This confuses everyone. Memorize this:
- .loc: Location by Label (Name). "Find row 'Index-2023'".
- .iloc: Integer Location. "Find row 0".
pythondf.loc['2023-01-01', 'Revenue'] # Row Label, Col Label df.iloc[0, 1] # Row 0, Col 1