Skip to main content
HomePythonPreprocessing for Machine Learning in Python

Preprocessing for Machine Learning in Python

11 reviews

Learn how to clean and prepare your data for machine learning!

Start Course for Free
4 Hours20 Videos62 Exercises
43,961 LearnersTrophyStatement of Accomplishment

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
GroupTraining 2 or more people?Try DataCamp For Business

Loved by learners at thousands of companies

Course Description

This course covers the basics of how and when to perform data preprocessing. This essential step in any machine learning project is when you get your data ready for modeling. Between importing and cleaning your data and fitting your machine learning model is when preprocessing comes into play. You'll learn how to standardize your data so that it's in the right form for your model, create new features to best leverage the information in your dataset, and select the best features to improve your model fit. Finally, you'll have some practice preprocessing by getting a dataset on UFO sightings ready for modeling.
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more
Try DataCamp for BusinessFor a bespoke solution book a demo.
  1. 1

    Introduction to Data Preprocessing


    In this chapter you'll learn exactly what it means to preprocess data. You'll take the first steps in any preprocessing journey, including exploring data types and dealing with missing data.

    Play Chapter Now
    Introduction to preprocessing
    50 xp
    Exploring missing data
    50 xp
    Dropping missing data
    100 xp
    Working with data types
    50 xp
    Exploring data types
    50 xp
    Converting a column type
    100 xp
    Training and test sets
    50 xp
    Class imbalance
    50 xp
    Stratified sampling
    100 xp
  2. 2

    Standardizing Data

    This chapter is all about standardizing data. Often a model will make some assumptions about the distribution or scale of your features. Standardization is a way to make your data fit these assumptions and improve the algorithm's performance.

    Play Chapter Now
  3. 4

    Selecting Features for Modeling

    This chapter goes over a few different techniques for selecting the most important features from your dataset. You'll learn how to drop redundant features, work with text vectors, and reduce the number of features in your dataset using principal component analysis (PCA).

    Play Chapter Now

In the following tracks

Data Scientist in PythonMachine Learning Scientist with Python


Collaborator's avatar
Nick Solomon
Collaborator's avatar
Kara Woo
James Chapman HeadshotJames Chapman

Curriculum Manager, DataCamp

James is a Curriculum Manager at DataCamp, where he collaborates with experts from industry and academia to create courses on AI, data science, and analytics. He has led nine DataCamp courses on diverse topics in Python, R, AI developer tooling, and Google Sheets. He has a Master's degree in Physics and Astronomy from Durham University, where he specialized in high-redshift quasar detection. In his spare time, he enjoys restoring retro toys and electronics.

Follow James on LinkedIn
See More

Don’t just take our word for it

from 11 reviews
Sort by
  • Zih-Yu C.
    11 months


  • Lee H.
    12 months


  • ANDRE B.
    about 1 year

    Well done and structure information, easy to learn!

  • Rafael R.
    over 1 year

    Very complete, teaches many things

  • Noranut T.
    over 1 year

    This process is required. I like the exercise which compare before and after StandardScaler. However, this course has yet included, the way to fill or replace NA cells. Good to learn anyhow.


Zih-Yu C.


Lee H.

"Well done and structure information, easy to learn!"


Join over 13 million learners and start Preprocessing for Machine Learning in Python today!

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.