Bases: object
Base table header reader
Parameters: |
|
---|
Attributes Summary
auto_format | str(object=’‘) -> string |
colnames | Return the column names of the table |
comment | |
exclude_names | |
include_names | |
n_data_cols | Return the number of expected data columns from data splitting. |
names | |
start_line | |
write_spacer_lines | list() -> new empty list |
Methods Summary
get_col_type(col) | |
get_cols(lines) | Initialize the header Column objects from the table lines. |
get_type_map_key(col) | |
process_lines(lines) | Generator to yield non-comment lines |
write(lines) |
Attributes Documentation
Return the number of expected data columns from data splitting. This is either explicitly set (typically for fixedwidth splitters) or set to self.names otherwise.
Methods Documentation
Initialize the header Column objects from the table lines.
Based on the previously set Header attributes find or create the column names. Sets self.cols with the list of Columns. This list only includes the actual requested columns after filtering by the include_names and exclude_names attributes. See self.names for the full list.
Parameters: | lines – list of table lines |
---|---|
Returns: | None |
Generator to yield non-comment lines