Exercise: Categorical Univariate Analysis

Practice with some lab exercises.

We'll cover the following

Exercise 1

In this exercise, we’ll use our knowledge to perform univariate analysis on a categorical variable (using pie charts and countplots). Create a countplot of the Meeting variable to see how many records in this dataset are achieved at certain meets.

Solution

  • The below code creates a countplot using Plotly graph objects, where the x-axis represents the Meeting variable of the athlete_records_shortened.csv dataset.

  • On line 2, the go.Histogram() function is used to create the countplot, where the x parameter specifies the data to use.

Get hands-on with 1200+ tech skills courses.