Skip to main content
Loading page…
Python Mastery
Chapter 41
Lesson 2 of 5
Loading & Selecting Data
Contents
Notes
Tutor
Concept
I/O: Reading and Writing Files
Loading activity…
Previous
1 / 9
Continue
Contents
Notes
Discussion
Tutor
30 min
9 activities
0 of 9 done
In this lesson
1
I/O: Reading and Writing Files
2
Selecting Columns and Rows: loc vs iloc
3
Filtering and Selecting in Practice
4
Adding, Dropping, and Renaming Columns
5
Practice: Filter and Enrich
6
loc vs iloc: Inclusive vs Exclusive Slicing
7
I/O Functions
8
Gotcha: Chained Assignment Creates Silent Bugs
9
Why use query() over boolean indexing?
Objectives
Learner can read CSV, Excel, and JSON files into a DataFrame
Learner can write a DataFrame back to CSV and JSON
Learner can select columns by name and by list
Learner can use loc (label-based) and iloc (position-based) correctly
Learner can filter rows with boolean masks and with query()
Learner can add, drop, and rename columns safely without chained-assignment bugs
Chapter 41 · Pandas: Real-World Data Analysis
Series & DataFrame
Loading & Selecting Data
Cleaning & Transforming
GroupBy, Aggregation & Merge
A Real Mini-Analysis
Previous: Series & DataFrame
Next: Cleaning & Transforming