astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v1.1.1 »
- ASCII Tables (`astropy.io.ascii`) »
- BaseData

# BaseData

class `astropy.io.ascii.``BaseData`

  Bases: `object`

  Base table data reader.

  Attributes Summary

  `comment` | Regular expression for comment lines
  `end_line` | None, int, or a function of `lines` that returns None or int
  `fill_exclude_names` |
  `fill_include_names` |
  `fill_values` |
  `formats` |
  `start_line` | None, int, or a function of `lines` that returns None or int
  `write_spacer_lines` |

  Methods Summary

  `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.
  `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 `lines`
  `str_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 `lines` that returns None or int

  `fill_exclude_names` = None
  `fill_include_names` = None
  `fill_values` = [(masked, '--')]
  `formats` = {}
  `start_line` = None

    None, int, or a function of `lines` that returns None or int

  `write_spacer_lines` = ['ASCII_TABLE_WRITE_SPACER_LINE']

  Methods Documentation

  `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.

  `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`. In the second step all replacements are done for the appropriate columns.

  `process_lines`(lines)

    Strip out comment lines and blank lines from list of `lines`

    Parameters:

    lines : list

    > All lines in table

    Returns:

    lines : list

    > List of lines

  `str_vals`()

    convert all values in table to a list of lists of strings

  `write`(lines)