astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v5.2.1 »
- Data Tables (`astropy.table`) »
- SCEngine

# SCEngine

class astropy.table.SCEngine(data, row_index, unique=False)

  Bases: `object`

  Fast tree-based implementation for indexing, using the `sortedcontainers` package.

  Parameters:
    data `Table`

      Sorted columns of the original table

    row_index `Column` `object`

      Row numbers corresponding to data columns

    unique bool

      Whether the values of the index must be unique. Defaults to False.

  Methods Summary

  `add`(key, value) | Add a key, value pair.
  `find`(key) | Find rows corresponding to the given key.
  `items`() | Return a list of key, data tuples.
  `range`(lower, upper[, bounds]) | Return row values in the given range.
  `remove`(key[, data]) | Remove data from the given key.
  `replace_rows`(row_map) | Replace rows with the values in row_map.
  `shift_left`(row) | Decrement rows larger than the given row.
  `shift_right`(row) | Increment rows greater than or equal to the given row.
  `sort`() | Make row order align with key order.
  `sorted_data`() | Return a list of rows in order sorted by key.

  Methods Documentation

  add(key, value)

    Add a key, value pair.

  find(key)

    Find rows corresponding to the given key.

  items()

    Return a list of key, data tuples.

  range(lower, upper, bounds=(True, True))

    Return row values in the given range.

  remove(key, data=None)

    Remove data from the given key.

  replace_rows(row_map)

    Replace rows with the values in row_map.

  shift_left(row)

    Decrement rows larger than the given row.

  shift_right(row)

    Increment rows greater than or equal to the given row.

  sort()

    Make row order align with key order.

  sorted_data()

    Return a list of rows in order sorted by key.