· beginner
Files, CSV and JSON
Get data in and out of your programs. Text files, the two formats you will meet constantly, filesystem paths that work everywhere, and loading messy data without crashing on row four hundred.
Written in house, from the work rather than from a syllabus. Every example is one we would use ourselves, and every exercise is checked against the same engine that grades your answer.
What you’ll learn
- Read and write text files without leaking handles
- Parse CSV into dictionaries and write it back correctly
- Convert between JSON and Python structures
- Build filesystem paths that work on any operating system
- Load imperfect data row by row and report what failed
- Choose between CSV and JSON for a given job
Before you start
- · Functions and Error Handling in Python
- · Comfort with lists and dictionaries