BaseData

class astropy.io.ascii.core.BaseData [edit on github][source]

Bases: object

Base table data reader.

Parameters:
  • start_line – None, int, or a function of lines that returns None or int
  • end_line – None, int, or a function of lines that returns None or int
  • comment – Regular expression for comment lines
  • splitter_class – Splitter class for splitting data lines into columns

Attributes Summary

comment
fill_values list() -> new empty list
start_line
write_spacer_lines list() -> new empty list
end_line
formats
fill_exclude_names
fill_include_names

Methods Summary

process_lines(lines) Strip out comment lines and blank lines from list of lines
masks(cols) Set fill value for each column and then apply that fill value In the first step it is evaluated with value from fill_values applies to which column using fill_include_names and fill_exclude_names.
get_data_lines(lines) Set the data_lines attribute to the lines slice comprising the table data values.
get_str_vals() Return a generator that returns a list of column values (as strings) for each data line.
write(lines)

Attributes Documentation

comment = None
fill_values = []
start_line = None
write_spacer_lines = ['ASCII_TABLE_WRITE_SPACER_LINE']
end_line = None
formats = {}
fill_exclude_names = None
fill_include_names = None

Methods Documentation

process_lines(lines) [edit on github][source]

Strip out comment lines and blank lines from list of lines

Parameters:lines – all lines in table
Returns:list of lines
masks(cols) [edit on github][source]

Set fill value for each column and then apply that fill value

In the first step it is evaluated with value from fill_values applies to which column using fill_include_names and fill_exclude_names. In the second step all replacements are done for the appropriate columns.

get_data_lines(lines) [edit on github][source]

Set the data_lines attribute to the lines slice comprising the table data values.

get_str_vals() [edit on github][source]

Return a generator that returns a list of column values (as strings) for each data line.

write(lines) [edit on github][source]

Page Contents