Coding Exercises: pandas
1h 23mIntermediate2022-03-29
Authors

Harshit Tyagi
Data Science Instructor and Mentor
Course details
Want to test your pandas skills? These concise challenges let you stretch your brain and test your talents. Instructor Harshit Tyagi shares over a dozen pandas challenges, as well as his own solutions to each problem. Harshit’s challenges cover: Reading files and initial exploration of data using pandas attributes; data cleaning; creating subsets of data using indexing and slicing; writing queries to filter out rows based on conditional statements and Boolean indexing; and grouping and aggregation to answer categorical questions. Learn to apply statistical functions to groups. And since each challenge is self-contained, you can complete the course in any order—and at your own pace. Tune in to get the hands-on practice you need to keep your skills sharp.
Skills covered
pandasData AnalysisData ScienceBusiness Analysis and StrategyBusiness Software and ToolsOpen SourceOne-Off
Concepts
0. Introduction
- 01 - Stretch and test your knowledge with pandas code challenges
- 02 - What you should know
1. Reading and Initial Exploration of Data
- 03 - Read data from CSV and Excel files
- 04 - Check DataFrame information and identify types of columns
- 05 - The summary statistics of numerical and categorical features
- 06 - Add new columns to a DataFrame
2. Indexing and Slicing
- 07 - Select specific columns in a DataFrame
- 08 - Subset the data from labels using .loc method
- 09 - Subset the data from indexing using .iloc method
3. Data Cleaning
- 10 - Check for missing values
- 11 - Correct the data type of a column
- 12 - Parse dates in time series data
4. Filtering Data
- 13 - Write conditional statements to filter rows
- 14 - Chain multiple conditionals to narrow down the search
- 15 - Using bitwise operators to filter rows
- 16 - Filtering to find target demography
5. Grouping and Aggregation
- 17 - Apply the three-step process to group and aggregate data
- 18 - Group and aggregate multiple columns
- 19 - Apply a custom aggregate function
- 20 - Calculate stock returns for every year since 2003