Block 138: Building a Reusable Automation Script
Create a complete, well-structured, reusable automation script.
Concepts
- argparse for command-line arguments
- if __name__ == '__main__' guard
- Modular function structure
- requirements.txt and README documentation
Code Examples
See exercise below.
Exercise
Build a script that: scans a folder for CSVs, merges them into one, cleans nulls, exports merged CSV. Accept folder and output paths as CLI arguments. Add logging, error handling, and test 3 edge cases.
Homework
Run your script from the command line with --help and verify the documentation is clear. Friday