astro py:docs

- Index
- Modules

### Navigation

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

# BaseData

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

  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` |
  `end_line` |
  `fill_exclude_names` |
  `fill_include_names` |
  `fill_values` | list() -> new empty list
  `formats` |
  `start_line` |
  `write_spacer_lines` | list() -> new empty list

  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 In the first step it is evaluated with value from `fill_values` applies to which column using `fill_include_names` and `fill_exclude_names`.
  `process_lines`(lines) | Strip out comment lines and blank lines from list of `lines`
  `write`(lines) |

  Attributes Documentation

  `comment` = None
  `end_line` = None
  `fill_exclude_names` = None
  `fill_include_names` = None
  `fill_values` = []
  `formats` = {}
  `start_line` = None
  `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 – all lines in table
    Returns: | list of lines

  `write`(lines)