Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Python Data Cleaning Cookbook
  • Table Of Contents Toc
Python Data Cleaning Cookbook

Python Data Cleaning Cookbook - Second Edition

By : Michael Walker
4.9 (22)
close
close
Python Data Cleaning Cookbook

Python Data Cleaning Cookbook

4.9 (22)
By: Michael Walker

Overview of this book

Jumping into data analysis without proper data cleaning will certainly lead to incorrect results. The Python Data Cleaning Cookbook - Second Edition will show you tools and techniques for cleaning and handling data with Python for better outcomes. Fully updated to the latest version of Python and all relevant tools, this book will teach you how to manipulate and clean data to get it into a useful form. he current edition focuses on advanced techniques like machine learning and AI-specific approaches and tools for data cleaning along with the conventional ones. The book also delves into tips and techniques to process and clean data for ML, AI, and NLP models. You will learn how to filter and summarize data to gain insights and better understand what makes sense and what does not, along with discovering how to operate on data to address the issues you've identified. Next, you’ll cover recipes for using supervised learning and Naive Bayes analysis to identify unexpected values and classification errors and generate visualizations for exploratory data analysis (EDA) to identify unexpected values. Finally, you’ll build functions and classes that you can reuse without modification when you have new data. By the end of this Data Cleaning book, you'll know how to clean data and diagnose problems within it.
Table of Contents (14 chapters)
close
close
13
Index

Imputing values with regression

We ended the previous recipe by assigning a group mean to missing values rather than the overall sample mean. As we discussed, this is useful when the variable that determines the groups is correlated with the variable that has the missing values. Using regression to impute values is conceptually similiar to this, but we typically use it when the imputation will be based on two or more variables.

Regression imputation replaces a variable’s missing values with values predicted by a regression model of correlated variables. This particular kind of imputation is known as deterministic regression imputation, since the imputed values all lie on the regression line, and no error or randomness is introduced.

One potential drawback of this approach is that it can substantially reduce the variance of the variable with missing values. We can use stochastic regression imputation to address this drawback. We explore both approaches in this recipe...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Python Data Cleaning Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon