Skip to content
Felix
  • Topics
    • My List
    • Felix Guide
    • Asset Management
    • Coding and Data Analysis
      • Data Analysis and Visualization
      • Financial Data Tools
      • Python
      • SQL
    • Credit
      • Credit Analysis
      • Restructuring
    • Financial Literacy Essentials
      • Financial Data Tools
      • Financial Math
      • Foundations of Accounting
    • Industry Specific
      • Banks
      • Chemicals
      • Consumer
      • ESG
      • Insurance
      • Oil and Gas
      • Pharmaceuticals
      • Project Finance
      • Real Estate
      • Renewable Energy
      • Technology
      • Telecoms
    • Introductory Courses
    • Investment Banking
      • Accounting
      • Financial Modeling
      • M&A and Divestitures
      • Private Debt
      • Private Equity
      • Valuation
      • Venture Capital
    • Markets
      • Economics
      • Equity Markets and Derivatives
      • Fixed Income and Derivatives
      • Introduction to Markets
      • Options and Structured Products
      • Other Capital Markets
      • Securities Services
    • Microsoft Office
      • Excel
      • PowerPoint
      • Word & Outlook
    • Professional Skills
      • Career Development
      • Expert Interviews
      • Interview Skills
    • Risk Management
    • Transaction Banking
    • Felix Live
  • Pathways
    • Investment Banking
    • Asset Management
    • Equity Research
    • Sales and Trading
    • Commercial Banking
    • Engineering
    • Operations
    • Private Equity
    • Credit Analysis
    • Restructuring
    • Venture Capital
    • CFA Institute
  • Certified Courses
  • Ask An Instructor
  • Support
  • Log in
  • Topics
    • My List
    • Felix Guide
    • Asset Management
    • Coding and Data Analysis
      • Data Analysis and Visualization
      • Financial Data Tools
      • Python
      • SQL
    • Credit
      • Credit Analysis
      • Restructuring
    • Financial Literacy Essentials
      • Financial Data Tools
      • Financial Math
      • Foundations of Accounting
    • Industry Specific
      • Banks
      • Chemicals
      • Consumer
      • ESG
      • Insurance
      • Oil and Gas
      • Pharmaceuticals
      • Project Finance
      • Real Estate
      • Renewable Energy
      • Technology
      • Telecoms
    • Introductory Courses
    • Investment Banking
      • Accounting
      • Financial Modeling
      • M&A and Divestitures
      • Private Debt
      • Private Equity
      • Valuation
      • Venture Capital
    • Markets
      • Economics
      • Equity Markets and Derivatives
      • Fixed Income and Derivatives
      • Introduction to Markets
      • Options and Structured Products
      • Other Capital Markets
      • Securities Services
    • Microsoft Office
      • Excel
      • PowerPoint
      • Word & Outlook
    • Professional Skills
      • Career Development
      • Expert Interviews
      • Interview Skills
    • Risk Management
    • Transaction Banking
    • Felix Live
  • Pathways
    • Investment Banking
    • Asset Management
    • Equity Research
    • Sales and Trading
    • Commercial Banking
    • Engineering
    • Operations
    • Private Equity
    • Credit Analysis
    • Restructuring
    • Venture Capital
    • CFA Institute
  • Certified Courses
Felix
  • Data
    • Company Analytics
    • My Filing Annotations
    • Market & Industry Data
    • United States
    • Relative Valuation
    • Discount Rate
    • Building Forecasts
    • Capital Structure Analysis
    • Europe
    • Relative Valuation
    • Discount Rate
    • Building Forecasts
    • Capital Structure Analysis
  • Models
  • Account
    • Edit my profile
    • My List
    • Restart Homepage Tour
    • Restart Company Analytics Tour
    • Restart Filings Tour
  • Log in
  • Ask An Instructor
    • Email Our Experts
    • Felix User Guide
    • Contact Support

Pandas

Create and manipulate Pandas and DataFrames. Create and manipulate Pandas Series. Filter data using Boolean Masks. Segment and summarize data by class with groupby's.

Unlock Your Certificate   
 
0% Complete

18 Lessons (31m)

Show lesson playlist
  • Description & Objectives

  • 1. Pandas Learning Objectives

    00:27
  • 2. Pandas Introduction

    02:14
  • 3. Importing Data

    02:49
  • 4. Import From.csv

    01:32
  • 5. Get to Know Your DataFrame

    00:59
  • 6. DataFrame Workout

    02:20
  • 7. Summary Statistics

    01:47
  • 8. Summary Statistics Workout

    01:14
  • 9. Series

    02:13
  • 10. Series Functions

    01:01
  • 11. Feature Engineering

    00:58
  • 12. Series Functions & Feature Engineering Workout

    02:12
  • 13. Boolean Masks

    03:47
  • 14. Indicator Variables

    02:57
  • 15. Boolean Mask Workout

    01:45
  • 16. Segmenting with .groupby

    01:56
  • 17. Groupby Function Workout

    01:00
  • 18. Pandas Review

    00:14

Prev: NumPy

Boolean Masks

  • Notes
  • Questions
  • Transcript
  • 03:47

How Boolean object types in Python, demonstrating how to create and apply Boolean masks to filter data frames based on specific conditions.

Downloads

series.csv

Glossary

Boolean Pandas Python
Back to top
Financial Edge Training

© Financial Edge Training 2025

Topics
Introduction to Finance Accounting Financial Modeling Valuation M&A and Divestitures Private Equity
Venture Capital Project Finance Credit Analysis Transaction Banking Restructuring Capital Markets
Asset Management Risk Management Economics Data Science and System
Request New Content
System Account User Guide Privacy Policy Terms & Conditions Log in
Transcript

In the second lesson, you learned about the Boolean object type, which encompasses true false, and any code that you write that returns one of those values. Here I just have 1 is greater than 0, and then we're checking the type of 1 is greater than 0. When I execute that cell, you're gonna see that 1 is greater than 0 returns true, and that the type of that is Boolean. That's an example of the Boolean object type. You can filter your data frames with something called a Boolean mask. A Boolean mask is a Panda series containing a sequence of true and false values, just like you see here in Excel. If you wanted to filter this table using the equivalent of a Boolean mask, then you could create a column of true and false values testing a condition like you see right here where we're testing whether the values in series one are greater than two. And then once you test that condition and have true and false values, you could then filter out all of the rows with false values. That's essentially the function performed by a Boolean mask in Python. In Python the process of creating a Boolean mask is really similar to what you just saw. It just looks a little bit different. So here we've created a new data frame called series df, and then down below we're creating this Boolean mask. I've named it Boolean Mask, and I'm defining it as first my series. I'm pointing to my series, and then a condition to test. So I'm testing if the values in my series, series one are greater than the value two, and then I'm just displaying my Boolean Mask. So you see here, my Boolean mask looks a lot like what we saw in Excel. I have those two false values because one and two are not greater than two, and then three, four and five are greater than two. So we get true values. To apply that Boolean mask to our data frame. We write the name of our data frame, and then in square brackets the Boolean mask. And that tells Python that we want to show the rows in series dataframe where our Boolean mask indicates a true value. So when I execute that cell, I'm going to see only row three, four, and five. If you want to invert the filter so that false values are shown and true values are hidden, use the tilda symbol also called the invert operator in front of the name of your Boolean mask. Just like this, when I execute that code cell, I'm going to get one and two, and three, four and five will be filtered out. There's actually a shortcut that can save you the step of creating your Boolean mask, that separate Pandas series containing those true and false values. So if I just use my Boolean mask like you saw before by writing the name of my data frame, and then in square brackets the name of my Boolean mask. Here I'm filtering out row one and two, And the result is row three, four, and five. I can get the exact same result by instead of creating this Boolean mask right here, I just pass in square brackets my condition. So I write the name of my data frame, and then in square brackets the series that I want to test, and then the condition that I'm testing and Python will automatically interpret that as a Boolean mask and give me the exact same output. If I wanted to invert that, I can just put my series and my condition in parentheses like this, and then just throw a tilda or that invert symbol in front of my first open parentheses, and when I execute it, I'm gonna get the inverted Boolean mask.

Content Requests and Questions

You are trying to access premium learning content.

Discover our full catalogue and purchase a course Access all courses with our premium plans or log in to your account
Help

You need an account to contact support.

Create a free account or log in to an existing one

Sorry, you don't have access to that yet!

You are trying to access premium learning content.

Discover our full catalogue and purchase a course Access all courses with our premium plans or log in to your account

You have reached the limit of annotations (10) under our premium subscription. Upgrade to unlock unlimited annotations.

Find out more about our premium plan

You are trying to access content that requires a free account. Sign up or login in seconds!

Create a free account or log in to an existing one

You are trying to access content that requires a premium plan.

Find out more about our premium plan or log in to your account

Only US listed companies are available under our Free and Boost plans. Upgrade to Pro to access over 7,000 global companies across the US, UK, Canada, France, Italy, Germany, Hong Kong and more.

Find out more about our premium plan or log in to your account

A pro account is required for the Excel Add In

Find out more about our premium plan

Congratulations on completing

This field is hidden when viewing the form
Name(Required)
This field is hidden when viewing the form
Rate this course out of 5, where 5 is excellent and 1 is terrible.
Were the stated learning objectives met?(Required)
Were the stated prerequisite requirements appropriate and sufficient?(Required)
Were the program materials, including the qualified assessment, relevant and did they contribute to the achievement of the learning objectives?(Required)
Was the time allotted to the learning activity appropriate?(Required)
Are you happy for us to use your feedback and details in future marketing?(Required)

Thank you for already submitting feedback for this course.

CPE

What is CPE?

CPE stands for Continuing Professional Education, by completing learning activities you earn CPE credits to retain your professional credentials. CPE is required for Certified Public Accountants (CPAs). Financial Edge Training is registered with the National Association of State Boards of Accountancy (NASBA) as a sponsor of continuing professional education on the National Registry of CPE Sponsors.

What are CPE credits?

For self study programs, 1 CPE credit is awarded for every 50 minutes of elearning content, this includes videos, workouts, tryouts, and exams.

CPE Exams

You must complete the CPE exam within 1 year of accessing a related playlist or course to earn CPE credits. To see how long you have left to complete a CPE exam, hover over the locked CPE credits button.

What if I'm not collecting CPE credits?

CPE exams do not count towards your FE certification. You do not need to complete the CPE exam if you are not collecting CPE credits, but you might find it useful for your own revision.


Further Help
  • Felix How to Guide walks you through the key functions and tools of the learning platform.
  • Playlists & Tryouts: Playlists are a collection of videos that teach you a specific skill and are tested with a tryout at the end. A tryout is a quiz that tests your knowledge and understanding of what you have just learned.
  • Exam: If you are collecting CPE points you must pass the relevant CPE exam within 1 year to receive credits.
  • Glossary: A glossary can be found below each video and provides definitions and explanations for terms and concepts. They are organized alphabetically to make it easy for you to find the term you need.
  • Search function: Use the Felix search function on the homepage to find content related to what you want to learn. Find related video content, lessons, and questions people have asked on the topic.
  • Closed Captions & Transcript: Closed captions and transcripts are available on videos. The video transcript can be found next to the closed captions in the video player. The transcript feature allows you to read the transcript of the video and search for key terms within the transcript.
  • Questions: If you have questions about the course content, you will find a section called Ask a Question underneath each video where you can submit questions to our expert instructor team.