12 week python leveling up
A simple Python script that cleans messy CSV files by:
- Removing duplicate rows
- Replacing missing values with "N/A"
- Saving a cleaned copy as cleaned_data.csv
- Python 3.x
- pandas library
pip install pandas
python clean_csv.py
Make sure the input file data.csv
is in the same folder as the script.
Input file: data.csv
Output file: cleaned_data.csv
What I learned:
- How to use pandas to load and modify CSV files
- The importance of pseudocode before coding
- How this type of script could be valuable on Fiverr