Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Data Preprocessing in Python

You're reading from   Hands-On Data Preprocessing in Python Learn how to effectively prepare data for successful data analytics

Arrow left icon
Product type Paperback
Published in Jan 2022
Publisher Packt
ISBN-13 9781801072137
Length 602 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Roy Jafari Roy Jafari
Author Profile Icon Roy Jafari
Roy Jafari
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Part 1:Technical Needs
2. Chapter 1: Review of the Core Modules of NumPy and Pandas FREE CHAPTER 3. Chapter 2: Review of Another Core Module – Matplotlib 4. Chapter 3: Data – What Is It Really? 5. Chapter 4: Databases 6. Part 2: Analytic Goals
7. Chapter 5: Data Visualization 8. Chapter 6: Prediction 9. Chapter 7: Classification 10. Chapter 8: Clustering Analysis 11. Part 3: The Preprocessing
12. Chapter 9: Data Cleaning Level I – Cleaning Up the Table 13. Chapter 10: Data Cleaning Level II – Unpacking, Restructuring, and Reformulating the Table 14. Chapter 11: Data Cleaning Level III – Missing Values, Outliers, and Errors 15. Chapter 12: Data Fusion and Data Integration 16. Chapter 13: Data Reduction 17. Chapter 14: Data Transformation and Massaging 18. Part 4: Case Studies
19. Chapter 15: Case Study 1 – Mental Health in Tech 20. Chapter 16: Case Study 2 – Predicting COVID-19 Hospitalizations 21. Chapter 17: Case Study 3: United States Counties Clustering Analysis 22. Chapter 18: Summary, Practice Case Studies, and Conclusions 23. Other Books You May Enjoy

Example 3 – level I and II data cleaning

In this example, we want to use Electric_Production.csv to make predictions. We are specifically interested in being able to predict what the monthly electricity demand will be 1 month from now. This 1-month gap is designed in the prediction model so that the predictions that come from the model will have decision-making values; that is, the decision-makers will have time to react to the predicted value.

We would like to use linear regression to perform this prediction. The independent and dependent attributes for this prediction are shown in the following diagram:

Figure 10.7 – The independent and dependent attributes needed for the prediction task

Let's go through the independent attributes shown in the preceding diagram:

  • Average demand of the month over the years: For instance, if the month we want to predict demands for is March 2022, we want to use the average of the demands for every...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime