Introduction
We convert data to categorical to save memory and make analysis faster. It also helps group similar values together.
When you have a column with a few repeated text values, like colors or categories.
When you want to reduce the size of a large dataset with repeated labels.
When preparing data for machine learning models that work better with categories.
When you want to order categories, like small, medium, large.
When you want to improve performance of filtering or grouping operations.