Categorical data

Practicing Statistics Interview Questions in Python

Conor Dewey

Data Scientist, Squarespace

Types of variables

Map of different variable types

Practicing Statistics Interview Questions in Python

Encoding categorical data

Label encoding example

One-hot encoding example

1 What is One Hot Encoding and How to Do It
Practicing Statistics Interview Questions in Python

Example: laptop models

  DataFrame head

Practicing Statistics Interview Questions in Python

Example: laptop models

company_count = df['Company'].value_counts()
sns.barplot(company_count.index, company_count.values)

Bar plot showing

Practicing Statistics Interview Questions in Python

Box plots

 

Intro to box plots

1 Wikimedia
Practicing Statistics Interview Questions in Python

Example: laptop models

df.boxplot('Price', 'Company', rot = 30, figsize=(12,8), vert=False)

Bar plot showing laptop counts

Practicing Statistics Interview Questions in Python

Summary

  • Types of variables
  • Encoding techniques
  • Sample exploratory data analysis
Practicing Statistics Interview Questions in Python

Let's prepare for the interview!

Practicing Statistics Interview Questions in Python

Preparing Video For Download...