Numerical & Categorical Data Preprocessing in Machine Learning: The Foundation of Better Models
📰 Medium · Python
Learn how to preprocess numerical and categorical data for better machine learning models, a crucial step in improving model performance and reliability.
Action Steps
- Load your dataset using Python's pandas library to explore and understand the data.
- Handle missing values by using techniques such as mean, median, or imputation to ensure data quality.
- Scale numerical data using StandardScaler or MinMaxScaler to prevent feature dominance.
- Encode categorical data using LabelEncoder, OneHotEncoder, or OrdinalEncoder to convert them into numerical representations.
- Split your data into training and testing sets using train_test_split to evaluate model performance.
Who Needs to Know This
Data scientists and machine learning engineers can benefit from this article to improve their data preprocessing skills, which is essential for building accurate and reliable models. This skill is also useful for data analysts who want to work with machine learning models.
Key Insight
💡 Proper data preprocessing is essential for building accurate and reliable machine learning models, as it directly affects model performance and reliability.
Share This
🚀 Improve your machine learning models by learning how to preprocess numerical and categorical data! 📊
Full Article
Title: Numerical & Categorical Data Preprocessing in Machine Learning: The Foundation of Better Models
URL Source: https://medium.com/@padhansujit36/numerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f?source=rss------python-5
Published Time: 2026-05-31T08:10:08Z
Markdown Content:
[Sitemap](https://medium.com/sitemap/sitemap.xml)
[Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)
[](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------)
Get app
[Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------)
[Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

# Numerical & Categorical Data Preprocessing in Machine Learning: The Foundation of Better Models
[](https://medium.com/@padhansujit36?source=post_page---byline--13a464cca42f---------------------------------------)
[Sujit Padhan](https://medium.com/@padhansujit36?source=post_page---byline--13a464cca42f---------------------------------------)
Follow
7 min read
·
May 31, 2026
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2F13a464cca42f&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&user=Sujit+Padhan&userId=320748f2a68d&source=---header_actions--13a464cca42f---------------------clap_footer------------------)
2
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Frepost%2Fp%2F13a464cca42f&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&user=Sujit+Padhan&userId=320748f2a68d&source=---header_actions--13a464cca42f---------------------repost_header------------------)
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2F13a464cca42f&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&source=---header_actions--13a464cca42f---------------------bookmark_footer------------------)
[Listen](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2Fplans%3Fdimension%3Dpost_audio_button%26postId%3D13a464cca42f&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&source=---header_actions--13a464cca42f---------------------post_audio_button------------------)
Share
Press enter or click to view image in full size

From Raw Data to Better Models: A Complete
URL Source: https://medium.com/@padhansujit36/numerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f?source=rss------python-5
Published Time: 2026-05-31T08:10:08Z
Markdown Content:
[Sitemap](https://medium.com/sitemap/sitemap.xml)
[Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)
[](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------)
Get app
[Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------)
[Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

# Numerical & Categorical Data Preprocessing in Machine Learning: The Foundation of Better Models
[](https://medium.com/@padhansujit36?source=post_page---byline--13a464cca42f---------------------------------------)
[Sujit Padhan](https://medium.com/@padhansujit36?source=post_page---byline--13a464cca42f---------------------------------------)
Follow
7 min read
·
May 31, 2026
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2F13a464cca42f&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&user=Sujit+Padhan&userId=320748f2a68d&source=---header_actions--13a464cca42f---------------------clap_footer------------------)
2
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Frepost%2Fp%2F13a464cca42f&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&user=Sujit+Padhan&userId=320748f2a68d&source=---header_actions--13a464cca42f---------------------repost_header------------------)
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2F13a464cca42f&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&source=---header_actions--13a464cca42f---------------------bookmark_footer------------------)
[Listen](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2Fplans%3Fdimension%3Dpost_audio_button%26postId%3D13a464cca42f&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40padhansujit36%2Fnumerical-categorical-data-preprocessing-in-machine-learning-the-foundation-of-better-models-13a464cca42f&source=---header_actions--13a464cca42f---------------------post_audio_button------------------)
Share
Press enter or click to view image in full size

From Raw Data to Better Models: A Complete
DeepCamp AI