wholecell.io.tsv
CSV reader and writer that default to TAB delimiters.
- class wholecell.io.tsv.dict_reader(f, fieldnames=None, **kwargs)[source]
Bases:
object
Open a csv DictReader() defaulting to TAB delimiters. Fields whose names start with an underscore are removed from self._fieldnames, and discarded from each row during iteration.
REQUIRES: f must be a buffered byte reader, e.g. from io.open(filename, ‘rb’) or io.BytesIO(buffer).
- wholecell.io.tsv.dict_writer(f, fieldnames, dialect='excel', **kwargs)[source]
Open a csv DictWriter() defaulting to TAB delimiters.
REQUIRES: csvfile must be a buffered byte writer, e.g. from io.open(filename, ‘wb’) or io.BytesIO(buffer).
- Parameters:
- Return type:
- class wholecell.io.tsv.reader(csvfile, dialect='excel', delimiter='\t', **fmtparams)[source]
Bases:
object
Open a csv reader() defaulting to TAB delimiters.
REQUIRES: csvfile must be a buffered byte reader, e.g. from io.open(filename, ‘rb’) or io.BytesIO(buffer).
This does Unicode by constructing the csv.reader with a TextIO.
- Parameters:
- class wholecell.io.tsv.writer(csvfile, dialect='excel', delimiter='\t', **fmtparams)[source]
Bases:
object
Open a csv writer() defaulting to TAB delimiters.
REQUIRES: csvfile must be a buffered byte writer, e.g. from io.open(filename, ‘wb’) or io.BytesIO(buffer).
This does Unicode by constructing the csv.writer with a TextIO.
- Parameters: