Generates a modular Python DataCleaner class where each data issue gets its own method, all steps chain together, and every run logs what changed alongside before/after row counts.
Generates a modular Python DataCleaner class where each data issue gets its own method, all steps chain together, and every run logs what changed alongside before/after row counts. Use it when you need a repeatable, auditable cleaning pipeline for messy datasets.
Act as a Data Engineer building a reusable Python cleaning pipeline. Known issues in my dataset: - [ISSUE 1: e.g., dates in column C are mixed YYYY-MM-DD and DD/MM/YYYY] - [ISSUE 2: e.g., customer_id has leading zeros stripped in some rows] - [ISSUE 3: e.g., revenue column has currency symbols and commas] - [ISSUE 4: e.g., category column has 12 variations of 5 actual values] Write a Python class called DataCleaner with: - init accepting a pandas DataFrame - A separate method per cleaning issue - A .clean() method chaining all steps with logging of what changed - A .report() method printing before/after row counts per step Prioritize readability. Avoid regex unless necessary.
Source: https://www.buildfastwithai.com/blogs/ai-prompts-data-analyst-python-sql-chatgpt-2026