Linear Regression in Python: Categorical predictors

Learn how to include categorical predictors in a linear regression model.

Tue May 25, 2021 at 3:00 PM UTC

Event Information

In this session, we’ll demonstrate how to include a categorical predictor with two or more categories in a simple linear model. For example, we’ll learn how to predict the price of a New York City apartment based on the borough where it is located. This will help us build our intuition for how to create and interpret more complex linear models.


Headshot of Sophie Sommer

Sophie Sommer


Sophie is a Curriculum Developer focusing on Data Science content. Sophie is a former classroom teacher with a background in learning analytics and education research.

Headshot of Alex Kuntz

Alex Kuntz


Alex is a Senior Curriculum Developer, specializing in Data Science. Before working at Codecademy, Alex taught high school computer science classes.

Join Codecademy to gain access to this event.

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.