
Explore selecting subsets of data with pandas, and learn to set up and use Jupiter notebooks as part of the master data analysis with Python series.
Download and unzip the full course material from the resources section, organize it in a dedicated folder, and prepare to explore the Jupyter notebooks for selecting subsets of data.
Open and navigate the Jupyter notebooks in the master data analysis with Python course, read the material, run code cells, complete exercises with the solutions notebook across nine notebooks.
Watch exercise solution videos for chapter-end problems; due to a two-hour limit across three classes, not all videos are included. Solutions remain available in the Jupyter notebooks.
Explore subset selection from data frames using brackets to pick columns or rows, returning a data frame. Learn dual references by label or integer location with Luke and ILO indexers.
Learn how to select data with brackets, choosing single columns to yield a series or multiple columns to form a data frame, and understand inner versus outer brackets.
Complete hands-on exercises to select subsets of data from movie and Airbnb datasets, converting columns to series or data frames and performing single-column and multi-column selections.
Master simultaneous row and column subset selection with the Luke indexer to pull two rows and three columns by label, creating a new data frame while leaving the original unchanged.
Explore slice notation with loc to select rows and columns using start, stop, and step, noting the stop label is inclusive.
Unlock other subset selections with loc to obtain a scalar, a single row as a series, or a one-row data frame using label-based row and column indexing.
Complete notebook two exercises by selecting Home Alone and Top Gun rows and columns with index-based access, returning data frames, then inspect year and IMDb score with the info method.
Discover simultaneous row and column subset selection in data frames using integer location (iloc), with single indices, lists, negative indices, and slice notation.
Nine exercises on a movie dataset teach integer location indexing to select columns and rows, make slices and scalars, and return results as a data frame or a series.
Learn to select data from a pandas series using label-based (loc) and integer-based (iloc) indexing, including single labels, lists, slices, and boolean series.
Practice selecting data subsets in pandas by working with movie durations and wind series, using label and integer indices, and comparing loc versus iloc behaviors in range-based slicing.
Master data analysis with Python shows boolean selection by single conditions to filter data frame rows using actual values rather than labels.
practice boolean selection in Python by creating boolean series from a data frame column using comparison operators and filtering rows by a condition like trip duration.
Build pandas boolean filters using &, |, and ~ to implement and, or, and not, and manage operator precedence with parentheses for multi-condition data selections.
Learn to invert conditions in pandas using the not operator, handle precedence with parentheses, and build simple to complex filters for selecting data subsets.
Learn to filter a single string column with multiple equality checks using the is in method, then combine or and operations to select rides by weather events and duration.
Master data analysis with Python teaches boolean selection on a series, using comparison operators and the between method to filter temperatures by range, including the default inclusive bounds.
Explore simultaneous boolean selection of rows and column labels with loc in Python data analysis, enabling selecting subsets of data via filtering and column subsetting in one step.
Use column to column comparisons to filter rows where start capacity exceeds end capacity, via a boolean series; but boolean indexing does not work with iloc, use loc instead.
Use the info method to spot non-missing counts and columns with missing data, like start capacity and end capacity, then filter with is in any to get the missing rows.
The lecture introduces the query method for filtering a data frame, highlighting its readable syntax over boolean selection, with examples of single and multiple conditions, strings, quotes, and chain comparisons.
Explore column to column comparisons in the query method, including greater than checks between start capacity and end capacity, and use in and not in with lists snow and thunderstorms.
Apply arithmetic operations inside the query to filter data, such as start capacity exceeding end capacity by 20, and test right triangles with the Pythagorean theorem in a triangles dataset.
Learn to reference external variables with the at symbol in a query, select rides greater than 5000, and wrap space-containing column names in backticks.
Learn how to select columns when using the query method, noting you cannot select columns inline; use square brackets with a column list to retrieve the three columns.
Learn to filter data with the query method by evaluating per-row expressions that return true or false, using comparison operators, logical operators, in operator, quotes for strings, and arithmetic operations.
Navigate to python dot dundar data dot com to access the certification exam for selecting subsets of data and a Jupyter notebook, then sign in with a GitHub account.
Complete the certification exam solo using the provided Jupyter notebook and beer data set, implementing functions to return shapes, series, and data frames for all exercises.
Submit the exam from the assignments tab, with auto-save every 15 seconds; fetch feedback to view your score, see html feedback page, and watch videos on selecting subsets of data.
Master Data Analysis with Python - Selecting Subsets of Data targets those who want to completely master doing data analysis with pandas. This is the second course in the Master Data Analysis with Python series and provides extremely detailed coverage of how to do any type of subset selection within a pandas DataFrame or Series.
Exercises and a Free Certification Exam
Over 100 exercises with detailed solutions are available for you to practice. Additionally, there is a free challenging certification exam offered for those who want to validate their knowledge gained.
Expert Instructor
This course is taught by expert instructor Ted Petrou, author of the highly-rated text books Pandas Cookbook and Master Data Analysis with Python. Ted has taught over 1,000 hours of live in-person data science courses that use the pandas library. Pandas is a difficult library to use effectively and is often taught incorrectly with poor practices. Ted is extremely adept at using pandas and is known for developing best practices on how to use the library.
All of the material and exercises are written in Jupyter Notebooks available for you to download. This allows you to read the notes, run the code, and write solutions to the exercises all in a single place.
Become an Expert
This course targets those who have an interest in becoming experts and completely mastering the pandas library for data analysis in a professional environment. This course does not cover all of the pandas library, just a small and fundamental portion of it. If you are looking for a brief introduction of the entire pandas library, this course is not it. It takes many dozens of hours, lots of practice, and rigorous understanding to be successful using pandas for data analysis in a professional environment.
The Master Data Analysis with Python Series
Selecting Subsets of Data is second in the Master Data Analysis with Python series which includes the following sequence of courses:
Intro to Pandas
Selecting Subsets of Data with Pandas
Essential Pandas Commands
Grouping Data with Pandas
Time Series with Pandas
Cleaning Data with Pandas
Joining Data with Pandas
Data Visualization
Advanced Pandas
Exploratory Data Analysis
This course assumes no previous pandas experience. The only prerequisite knowledge is to understand the fundamentals of Python.