Learn csv
Read and write CSV and other delimited files correctly in plain Python
The csv module reads and writes comma-separated and other delimited text files, handling quoting, embedded commas and newlines, and spreadsheet dialects. It's the dependency-free way to import exports from Excel, databases and web services, or to produce files others can open. Knowing its rules avoids the corrupted-row bugs that come from splitting lines by hand.
Before you start
How deep do you want to go?
1. EssentialsRead and write simple code, do the everyday basics
2. PracticalUse it productively at work, with the usual idioms
3. AdvancedThe less common features, performance and trade-offs
4. ExpertInternals and the edge cases experts know