A little wrapper around reading and writing of csv file.
Project description
A little wrapper around reading and writing of csv file.
You can use:
data = csvfile.load("my-data.csv")
data[0]["field"] = "new value"
data.save()
Instead of:
data = []
with open("my-data.csv") as f:
reader = csv.DictReader(f)
fieldnames = reader.fieldnames
for row in reader:
data.append(row)
data[0]["field"] = "new value"
with open("my-data.csv, "w") as f:
writer = csv.DictWriter(f, fieldnames=fieldnames)
writer.writeheader()
writer.writerows(data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.