
A Beginner’s Guide to Converting Numerical Data to Categorical: Binning and Binarization
Author(s): Souradip Pal
Originally published on Towards AI.
This member-only story is on us. Upgrade to access all of Medium.
Imagine sifting through rows of data in a spreadsheet packed with numbers that look impressive at first glance. But when you try to analyze them, the digits feel like a maze, hard to interpret and even harder to draw conclusions from. Now, picture the same dataset, but this time, the numerical values have been grouped into tidy categories, making patterns jump out at you. It’s like watching a blurry image come into focus. Sounds better, right?
That’s exactly what converting numerical data into categorical data can do for you! In today’s post, we’ll dive into two game-changing techniques: Binning and Binarization, perfect for scenarios like those faced with datasets such as Google Playstore data, where categories — like the number of app downloads — are more telling than raw numbers.
By the end, you’ll know how to wrangle numerical data into meaningful categories with easy-to-follow code examples. Let’s get started, shall we?
First, let’s understand why you’d want to turn your perfectly good numerical data into categorical values.
Let’s take an example from the Google Playstore dataset. You have a column that tells you the number of times an… Read the full blog for free on Medium.
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.
Published via Towards AI
Take our 90+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!
Towards AI has published Building LLMs for Production—our 470+ page guide to mastering LLMs with practical projects and expert insights!

Discover Your Dream AI Career at Towards AI Jobs
Towards AI has built a jobs board tailored specifically to Machine Learning and Data Science Jobs and Skills. Our software searches for live AI jobs each hour, labels and categorises them and makes them easily searchable. Explore over 40,000 live jobs today with Towards AI Jobs!
Note: Content contains the views of the contributing authors and not Towards AI.