Skip to main content
Help us improve Python packaging – donate today!

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.open('my-data.csv').load()
data[0]['field'] = 'new value'
data.save()

Instead of:

data = []
with open('my-data.csv', 'rt') 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, 'wt') as f:
    writer = csv.DictWriter(f, fieldnames=fieldnames)
    writer.writeheader()
    writer.writerows(data)

Release history Release notifications

This version
History Node

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
csvfile-1.0.0.tar.gz (1.8 kB) Copy SHA256 hash SHA256 Source None Feb 17, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page