Skip to main content

Working with Categorical Data in Python

4.5+
24 reviews
Intermediate

Learn how to manipulate and visualize categorical data using pandas and seaborn.

Start Course for Free
4 Hours15 Videos52 Exercises
13,270 LearnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies


Course Description

Being able to understand, use, and summarize non-numerical data—such as a person’s blood type or marital status—is a vital component of being a data scientist. In this course, you’ll learn how to manipulate and visualize categorical data using pandas and seaborn. Through hands-on exercises, you’ll get to grips with pandas' categorical data type, including how to create, delete, and update categorical columns. You’ll also work with a wide range of datasets including the characteristics of adoptable dogs, Las Vegas trip reviews, and census data to develop your skills at working with categorical data.
  1. 1

    Introduction to Categorical Data

    Free

    Almost every dataset contains categorical information—and often it’s an unexplored goldmine of information. In this chapter, you’ll learn how pandas handles categorical columns using the data type category. You’ll also discover how to group data by categories to unearth great summary statistics.

    Play Chapter Now
    Course introduction
    50 xp
    Categorical vs. numerical
    100 xp
    Exploring a target variable
    100 xp
    Ordinal categorical variables
    100 xp
    Categorical data in pandas
    50 xp
    Setting dtypes and saving memory
    100 xp
    Creating a categorical pandas Series
    100 xp
    Setting dtype when reading data
    100 xp
    Grouping data by category in pandas
    50 xp
    Create lots of groups
    50 xp
    Setting up a .groupby() statement
    100 xp
    Using pandas functions effectively
    100 xp
  2. 2

    Categorical pandas Series

    Now it’s time to learn how to set, add, and remove categories from a Series. You’ll also explore how to update, rename, collapse, and reorder categories, before applying your new skills to clean and access other data within your DataFrame.

    Play Chapter Now
  3. 3

    Visualizing Categorical Data

    In this chapter, you’ll use the seaborn Python library to create informative visualizations using categorical data—including categorical plots (cat-plot), box plots, bar plots, point plots, and count plots. You’ll then learn how to visualize categorical columns and split data across categorical columns to visualize summary statistics of numerical columns.

    Play Chapter Now
  4. 4

    Pitfalls and Encoding

    Lastly, you’ll learn how to overcome the common pitfalls of using categorical data. You’ll also grow your data encoding skills as you are introduced to label encoding and one-hot encoding—perfect for helping you prepare your data for use in machine learning algorithms.

    Play Chapter Now

In the following tracks

Data Scientist with PythonData Scientist Professional with Python

Collaborators

Collaborator's avatar
Amy Peterson
Collaborator's avatar
Justin Saddlemyer
Kasey Jones HeadshotKasey Jones

Research Data Scientist

Kasey Jones is a research data scientist at RTI International. His work focuses primarily on agent-based model simulations and natural language processing analysis. He also enjoys creating unique visualizations using D3, and building R-Shiny and python Dash dashboards. Outside of RTI he spends his time working through leet code problems, playing chess, and traveling all over the world.
See More

Don’t just take our word for it

*4.5
from 24 reviews
75%
13%
4%
8%
0%
Sort by
  • Diego B.
    about 2 months

    Great

  • Josue U.
    3 months

    I had a great experience with this course, it figured out several question about manage of categorical data.

  • Jose H.
    4 months

    Very clear and engaging videos

  • Muhammad A.
    6 months

    That's a well managed and a good course

  • Debra G.
    6 months

    Very informative

"Great"

Diego B.

"I had a great experience with this course, it figured out several question about manage of categorical data."

Josue U.

"Very clear and engaging videos"

Jose H.

Join over 12 million learners and start Working with Categorical Data in Python today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.