pandas: DataFrame

Ha Khanh Nguyen (hknguyen)

1. Importing Data

2. What is a DataFrame?

2.1 Creating a DataFrame

2.2 Summary statistics of DataFrame columns

3. Selecting Rows/Columns of a DataFrame

3.1 Using []


BIG NOTES: As DataFrame is a dict of Series (where each key is the column name and each value is a Series), we cannot access the row using [].

3.2 Using iloc

3.3 Using loc


Try to use loc to select the following rows, columns:

4. Filtering DataFrame

5. Modifying DataFrame Values

This lecture notes reference materials from Chapter 5 of Wes McKinney's Python for Data Analysis 2nd Ed.