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
Building ETL Pipelines with Python

You're reading from   Building ETL Pipelines with Python Create and deploy enterprise-ready ETL pipelines by employing modern methods

Arrow left icon
Product type Paperback
Published in Sep 2023
Publisher Packt
ISBN-13 9781804615256
Length 246 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Brij Kishore Pandey Brij Kishore Pandey
Author Profile Icon Brij Kishore Pandey
Brij Kishore Pandey
Emily Ro Schoof Emily Ro Schoof
Author Profile Icon Emily Ro Schoof
Emily Ro Schoof
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Part 1:Introduction to ETL, Data Pipelines, and Design Principles
2. Chapter 1: A Primer on Python and the Development Environment FREE CHAPTER 3. Chapter 2: Understanding the ETL Process and Data Pipelines 4. Chapter 3: Design Principles for Creating Scalable and Resilient Pipelines 5. Part 2:Designing ETL Pipelines with Python
6. Chapter 4: Sourcing Insightful Data and Data Extraction Strategies 7. Chapter 5: Data Cleansing and Transformation 8. Chapter 6: Loading Transformed Data 9. Chapter 7: Tutorial – Building an End-to-End ETL Pipeline in Python 10. Chapter 8: Powerful ETL Libraries and Tools in Python 11. Part 3:Creating ETL Pipelines in AWS
12. Chapter 9: A Primer on AWS Tools for ETL Processes 13. Chapter 10: Tutorial – Creating an ETL Pipeline in AWS 14. Chapter 11: Building Robust Deployment Pipelines in AWS 15. Part 4:Automating and Scaling ETL Pipelines
16. Chapter 12: Orchestration and Scaling in ETL Pipelines 17. Chapter 13: Testing Strategies for ETL Pipelines 18. Chapter 14: Best Practices for ETL Pipelines 19. Chapter 15: Use Cases and Further Reading 20. Index 21. Other Books You May Enjoy

Transformation and data cleansing

As the next step in the pipeline creation tutorial, it is crucial to perform data cleansing tasks on each of the DataFrames to create reliable and trustworthy data for your clients. These tasks are essential for ensuring data quality and reliability. As a team, you decide to perform the following data cleansing tasks on each of the DataFrames:

  1. Remove duplicates: Remove any duplicate rows in each DataFrame, if any, using the drop_duplicates() function:
    df = df.drop_duplicates()
  2. Handle missing values: Check for any missing values in the DataFrames and handle them appropriately. For example, you can replace missing values in numeric columns with the mean and categorical columns with the mode using the fillna() function:
    # Replace missing values in numeric columns with the meandf.fillna(df.mean(), inplace=True)# Replace missing values in categorical columns with the modedf.fillna(df.mode().iloc[0], inplace=True)
  3. Convert data types: Convert...
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 $19.99/month. Cancel anytime