Skip to content
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.

opendatateam/csvapi-parser

Repository files navigation

csvapi parser

CSV parser, intended for use with csvapi.

This is based on, and depends on, the Agate library.

Provided a path to a CSV, it will:

  • try to guess the encoding with cchardet — encoding can be forced if needed;
  • try to guess the CSV dialect (delimiter and such) by using a custom sniffing method;
  • return an agate.Table object or raise an Exception.

Usage

from csv_parser import parse

table = parse('/path/to/csv')

# force the encoding
table = parse('/path/to/csv', encoding='utf-8')

Releases

No releases published

Packages

No packages published

Languages