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

Investor Classifiers in Python - Part 1

Understand the business case you’re going to model. Perform more advanced data exploration and visualization, and engineer features based on conditional relationships between existing features.

Unlock Your Certificate   
 
0% Complete

20 Lessons (30m)

Show lesson playlist
  • Description & Objectives

  • 1. Investor Classifiers Part 1 Learning Objectives

    00:21
  • 2. Overview of the Business Case

    04:08
  • 3. Importing Data Workout

    00:40
  • 4. Metadata

    01:46
  • 5. Metadata Workout

    00:28
  • 6. One Error Workout

    01:18
  • 7. Countplot of Investors Workout

    00:56
  • 8. Exploring Relationships

    05:03
  • 9. Exploring Relationships Workout

    00:55
  • 10. Reviewing Your Results

    01:21
  • 11. Feature Engineering

    01:48
  • 12. Feature Engineering Workout 1

    02:40
  • 13. Reviewing Tier Change

    01:15
  • 14. Controlling for Demotions

    00:47
  • 15. Feature Engineering Workout 2

    00:55
  • 16. Analyzing Goldman Sachs

    00:42
  • 17. fee_percent and invite_perfect Workout

    00:38
  • 18. lmplot

    02:07
  • 19. lmplot Workout

    00:54
  • 20. Investor Classifier in Python 1 Review

    00:54

Prev: Classification Algorithms Next: Investor Classifiers in Python - Part 2

Exploring Relationships

  • Notes
  • Questions
  • Transcript
  • 05:03

Exploring relationships and data visualization in Python.

Downloads

No associated resources to download.

Glossary

Machine Learning Python Relationships
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 this example, we group data by the categorical variable occupation and then applied the mean function to each group. We could do the same thing with our investor data like you see right here, but if you look at the output, it doesn't appear to highlight any really useful differences between the banks. But here's an interesting question. We're trying to predict if these investors will commit to a transaction or decline the transaction. So what if we asked, do banks decline the same proportion of transactions, or are some banks more selective than others? Could we take the countplot that you see right here and split the bars into commits and declines and see the difference in those proportions by investor? To answer that question, we would need to complete four steps. First, group the data by investor. Second, isolate the commit series, which is our target variable. Third count each investor's commit values and decline values. And then finally, we would want to plot these values in a bar chart. You already know how to use the groupby function to group data by class, and you already know how to isolate a series in a dataframe using the dot format in the square bracket format.

In addition, Pandas provides the value counts function that you see in the bottom cell here, which counts the values in each class of a series with a categorical variable. So in this case, we have the commit series, our target variable, and it has two classes commit and decline. So when we point Python to our investor data dataframe and then the commit series inside that dataframe and then pass the value counts function, it's going to return a count of both classes in that series. So we see that we have 5,700 commits and 1,500 declines.

You can combine these groupby and value count steps into one cell that groups data by investor, and then counts the value in each class of the commit feature. Look at what we're doing right here. We are first calling the investor data dataframe and then segmenting the data in that dataframe by the classes in the investor series.

Third, we're isolating the commit series.

And finally, we're applying the value counts function to tally the number of observations in each class of the commit series. If you need to pause the video and take a look at this code to make sure that it all makes sense. What I wanna show you now is that this piece of code is actually a series this that you see right here, even though it's grouped by the investors. This output is a series and I can show you by copying and pasting That code into the type function and the output that I'm going to get will tell me that this piece of code is a series. What that means is that any functionality that you can perform on a series, you can also perform on this group by value count. So all of your data visualization functions that you would normally apply to a Pandas series or a Pandas dataframe, you can also apply after you group the data by classes and after you count the values of those classes. This is a super useful tool as you're getting to know your data when you want to visualize it to get to know the relationships inside your data. And it's going to help us answer questions like, do some investors commit to a larger proportion of transactions than others? To visualize this, I can copy and paste this code again in another new cell, and then after it add the plot function inside that plot function. I'm gonna pass it the kind argument and give it BARH horizontal bar chart, and you can actually plot several different kinds of graphs with the plot function by changing the kind argument. There's a link below this video if you want to check out the full list of options that you can pass into that plot function, and that'll give you a lot of useful tools in your data visualization toolbox.

I'm gonna add the pyplot show function, and I've actually forgotten to include the dot right there. And that's important to separate the value counts from the plot function using this dot. So now when I execute the cell, I have this really nice horizontal bar chart. Take a look, what relationships do you notice in this bar plot? There seem to be some personality differences between each financial institution and the proportion of transactions they decline. If you were inviting banks to participate in a transaction, do you think this information could influence your decisions?

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.