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


Headshot of Alex Kuntz

Alex Kuntz


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.

Or sign up using: