Learn to Code ยท zero-dependency ยท MIT

larzcsv

Friendly CSV, companion to larzjson.

The other everyday data format, made beginner-friendly. A real from-scratch parser (quoted fields just work) that adds rows-as-dicts keyed by header, a clear error when a row has the wrong number of fields, and a plain-English summary of the columns.

larzscript pkg install csv
View on GitHub →Learn the stack

What you get

Try it

import "csv" as csv
let people = csv.parse_dicts("name,age\nAda,36\nBo,24")
print(people[0]["name"])
print(csv.summarize(people)["age"])
print(csv.to_csv_dicts(people))
Output
Ada
{count: 2, numeric: true, min: 24, max: 36, mean: 30}
name,age
Ada,36
Bo,24

Why it's in the Larz Stack

larzcsv is a real Larzscript package (larzscript pkg install csv) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.