Author: | Andreas Heger |
---|---|
Release: | $Id$ |
Date: | December 09, 2013 |
Tags: | Python |
tries to convert values in a dictionary.
if map contains ‘default’, a default conversion is enforced. For example, to force int for every column but column id, supply map = {‘default’ : “int”, “id” : “str” }
map fields to types based on rows.
Preference is Int to Float to String.
If get_max_values is set to true, the maximum values for integer columns are returned in a dictionary.
iterator class for stripping comments from file.
Bases: csv.DictReader
like csv.DictReader, but skip comments (lines starting with “#”).
drop-in for csv.DictReader - handles very large fields
Warning - minimal implementation - does not handle dialects
read a table from infile
returns table as rows or as columns. If remove_incomplete, incomplete rows are simply ignored.
read a set of csv tables.
Individual tables are separated by // on a single line.
group table by group_column.
The table need not be sorted.