4

Cleaning Messy Data and Data Manipulation

In this chapter, we’ll dive into the strategies of data manipulation, focusing on efficient techniques to clean and fix messy datasets. We’ll remove irrelevant columns, systematically address inconsistent data types, and fix dates and times.

In this chapter, we’ll cover the following topics:

  • Renaming columns
  • Removing irrelevant or redundant columns
  • Fixing data types
  • Working with dates and times

Technical requirements

You can find all the code for this chapter in the following GitHub link: https://github.com/PacktPublishing/Python-Data-Cleaning-and-Preparation-Best-Practices/tree/main/chapter04.

Each file is named according to the respective sections covered in this chapter.

Renaming columns

Renaming ...

Get Python Data Cleaning and Preparation Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.