Python CSV Transformation Automation Script -- 2

Заказчик: AI | Опубликовано: 14.11.2025

Each week I receive raw CSV exports that need to be reshaped before they can enter our downstream systems. Manually renaming columns, pivoting tables, and applying business rules is wasting too much time, so I want a repeatable Python solution that handles the entire data-transformation step for me. Here’s the workflow I have in mind: a single command (or notebook cell) reads one or many CSV files, applies the required transformations—such as column mapping, type casting, conditional calculations, and tidy re-ordering—and then writes the cleaned output to a new CSV (or optionally Excel) in a designated folder. I should be able to tweak the rules easily without touching core logic, so configuration via a JSON/YAML file or clearly commented constants would be ideal. Pandas is the obvious choice but I’m open to any standard Python 3 libraries you feel are better suited. The script must run on a vanilla environment (Python 3.10) with only pip-installable packages. Deliverables • Well-documented .py file (or Jupyter notebook) that performs the transformation • Sample config and sample input/output files proving it works end-to-end • README with setup instructions and a short usage example I’ll provide a small set of representative CSVs once we start so you can validate the rules. Code quality, clarity, and repeatability matter more to me than fancy UIs—please keep it simple, reliable, and easy to extend.