Guide

3 Real World Examples of Pandas

By Jess Feldman
Last updated on April 5, 2022

Data is used across industries to drive business decisions, and data scientists rely on Pandas, a Python library, to organize it in meaningful ways. But what does that look like on the job? The Data Science Bootcamp instructors at Lighthouse Labs break down why Pandas is so crucial in these three, real world examples. Plus, find out how you can learn Pandas in order to take your own data career to the next level!

Ready to start learning the basics of data science? Don’t miss the virtual 21-Day Data Challenge at Lighthouse Labs, which launches on April 11, 2022! Get a grasp on data science fundamentals while earning chances to win prizes!  

What is Pandas?

Pandas is a popular, powerful Python library and its main function is for data exploration, manipulation, and analysis. One of the main reasons it’s so popular is because real-world data can be messy and professionals spend a lot of time cleaning it up before they can work with it. Pandas’s superpower is making that data simple to import, clean, and transform to be usable for analysis. It also helps data scientists prepare data before they train models. It’s simple, it saves time, and a lot of things can be done with one line of code. If you’re working with data and using Python, you’ll be using Pandas no matter what your level is. Almost every business and industry has come to rely on data and there are many real-world examples of companies using Pandas. 

3 Real World Examples of Pandas

SInce Pandas is used to prepare and explore data for preliminary analysis, it’s used across industries and by many levels of data professionals. Here are 3 examples of how Pandas is used in the real world.

1. Netflix Recommendations

Data scientists for video subscription services like Netflix build recommendation systems in order to offer suggestions to their customers. Before data scientists can build and train their recommendation model, they have to go through pre-processing to understand the data. Pandas is an excellent library for all of the pre-analysis and exploration.

For example: Let’s take a group of friends, Rose, Amelia, and Zack who all have similar movie preferences. All of them watched Terminator 2, so the model might also recommend Terminator 3. Zack also watched Kindergarten Cop, so Netflix might take that information, and recommend Kindergarten Cop to Rose and Amelia as well. The model will continue to train itself to find out what the outcomes are of users and determine what to recommend next, and Pandas helps make that possible by allowing data scientists to pre-process all of that raw user data.

Below is an example of some of the first steps you might take using Pandas in order to explore a movie dataset. For a full code example of building a movie Recommender, please see this great article.

2. Churn Rate in Banking

Customer churn is a measurement that captures the ratio of customers that drop a product or service. Essentially, churn rate is capturing how many customers have been lost. For example, a bank might look at which customers closed their accounts, or switched to a different product offering. It’s an important metric for determining the quality or target demographics for a product, as well as when and why a customer might leave. A data scientist might look at this metric and figure out the characteristics of the lost customer, such as if most of them were female or paid by credit card. They’ll also look and see what types of customers stayed and used certain products.

For example: Pandas allows data scientists to easily manipulate the data and see only customers who stayed with the product or only customers who dropped the product. Data scientists can filter their data by different categories and draw out patterns between the two groups. They can look at existing customers and compare them with customers that leave the bank and drill into who is choosing to stay or leave and why.

The example below uses Pandas to explore whether any customer attributes are correlated with the customer leaving. You can find a full code example exploring this dataset and predicting customer churn in this helpful article.

3. Retail Sales Data Analytics

Retailers are also interested in data and pulling key findings from their customer data to help improve their product and service. A data scientist or data analyst for a retailer may pull all kinds of customer data using Pandas — and this data may be a very large set that draws from all departments. Their job is then to figure out trends to allow stores to make better decisions. 

For example: A data analyst for a supermarket might want to do data analysis and exploration on sales. This can include things like which month of the year produces the best sales, which branches have the highest sales, which cities have the best sales, and what the best selling product is. 

Below we use Pandas to perform some basic data exploration of monthly supermarket sales. (For another example of how Pandas can be used for sales analysis, check out this article.)

How to Learn Pandas at Lighthouse Labs

Pandas is one of the foundational tools we teach at Lighthouse Labs, and it’s introduced early because students will use it throughout the program. Every time students are given a new data set, they will apply their Pandas skills to explore, process, and prepare the data before moving on to building and training models. 

At Lighthouse Labs, we start by giving students data sets so they can focus on improving their skills rather than figuring out how to find the data. There are definitely opportunities later in the bootcamp for them to collect their own data. Later in the program, students will use APIs to gather data from different sources, import it, and then work with it using Pandas. 

Why learn data science at Lighthouse Labs?

Lighthouse Labs has live lectures, which allows students to ask questions in real time. We have a great team of mentors (many of them still are working as data science professionals in different industries!) here ready to support our students. Over the course of the Data Science Bootcamp, students will complete many projects to help them practice their skills and give them a portfolio to show employers after they graduate.

Do today’s employers expect data scientists to know Pandas?

Employers will expect their data scientists to know how to use Pandas — it’s such a ubiquitous tool in the industry! An employer would be surprised if a data scientist didn’t know how to use Pandas and it isn’t uncommon for Pandas to show up in job interviews. Many jobs include a take-home problem to solve and the interviewee will likely need to leverage their Pandas skills to solve it.

3 Online Resources for Learning Pandas

  1. The Pandas documentation is an excellent resource. They’re detailed, and full of code examples. 
  2. Realpython.com is a helpful resource for beginners because it starts with the basics and helps you build a foundation in a step-by-step accessible way.
  3. Exploring how other people use Pandas is a great way to expose yourself to Pandas applications and techniques. By reading articles on Kaggle or Medium, you can see how other data specialists deal with the same data set.

Find out more and read Lighthouse Labs reviews on Course Report. This article was produced by the Course Report team in partnership with Lighthouse Labs.

About The Author

Jess is the Content Manager for Course Report as well as a writer and poet. As a lifelong learner, Jess is passionate about education, and loves learning and sharing content about tech bootcamps. Jess received a M.F.A. in Writing from the University of New Hampshire, and now lives in Brooklyn, NY.

Also on Course Report

Get our FREE Ultimate Guide to Paying for a Bootcamp

By submitting this form, you agree to receive email marketing from Course Report.

Get Matched in Minutes

Just tell us who you are and what you’re searching for, we’ll handle the rest.

Match Me