In this chapter, we examined how to model categorical variables using pandas Categoricals. We started with a review of the ways to create Categoricals and also looked at several examples of how to utilize underlying integer codes to classify each category. We then examined several means of modifying a categorical once it has been created. The chapter closed with an example of using a categorical to break data into a set of named bins.
In the next chapter, we examine performing numerical and statistical analysis on pandas data.