bx.tabular.io module

Reading and writing delimited data files (with headers and comments).

class bx.tabular.io.Comment(line)

Bases: object

class bx.tabular.io.Header(fields)

Bases: object

Header of a table – contains column names and a mapping from them to column indexes

set_fields(fields)
exception bx.tabular.io.ParseError(*args, **kwargs)

Bases: Exception

class bx.tabular.io.TableReader(input, return_header=True, return_comments=True, force_header=None, comment_lines_startswith=['#'])

Bases: object

Reader for iterating tabular data

parse_comment(line)
parse_header(line)
parse_row(line)
class bx.tabular.io.TableRow(reader, fields)

Bases: object

A row of a table

property fieldnames