BaseData¶
-
class
astropy.io.ascii.BaseData[source]¶ Bases:
objectBase table data reader.
Attributes Summary
commentRegular expression for comment lines end_lineNone, int, or a function of linesthat returns None or intfill_exclude_namesfill_include_namesfill_valuesformatsstart_lineNone, int, or a function of linesthat returns None or intwrite_spacer_linesMethods Summary
get_data_lines(lines)Set the data_linesattribute 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. masks(cols)Set fill value for each column and then apply that fill value process_lines(lines)Strip out comment lines and blank lines from list of linesstr_vals()convert all values in table to a list of lists of strings write(lines)Attributes Documentation
-
comment= None¶ Regular expression for comment lines
-
end_line= None¶ None, int, or a function of
linesthat returns None or int
-
fill_exclude_names= None¶
-
fill_include_names= None¶
-
fill_values= [(<astropy.io.ascii.core.MaskedConstant object>, '')]¶
-
formats= {}¶
-
start_line= None¶ None, int, or a function of
linesthat returns None or int
-
write_spacer_lines= ['ASCII_TABLE_WRITE_SPACER_LINE']¶
Methods Documentation
-
get_data_lines(lines)[source]¶ Set the
data_linesattribute to the lines slice comprising the table data values.
-
get_str_vals()[source]¶ Return a generator that returns a list of column values (as strings) for each data line.
-
masks(cols)[source]¶ Set fill value for each column and then apply that fill value
In the first step it is evaluated with value from
fill_valuesapplies to which column usingfill_include_namesandfill_exclude_names. In the second step all replacements are done for the appropriate columns.
-