Bases: object
Implements a sorted array container using a list of numpy arrays.
| Parameters: | data : Table
row_index : Column object
unique : bool (defaults to False)
|
|---|
Attributes Summary
| cols |
Methods Summary
| add(key, row) | Add a new entry to the sorted array. |
| find(key) | Find all rows matching the given key. |
| find_pos(key, data[, exact]) | Return the index of the largest key in data greater than or equal to the given key, data pair. |
| items() | Retrieve all array items as a list of pairs of the form |
| range(lower, upper, bounds) | Find values in the given range. |
| remove(key, data) | Remove the given entry from the sorted array. |
| replace_rows(row_map) | Replace all rows with the values they map to in the given dictionary. |
| shift_left(row) | Decrement all row numbers greater than the input row. |
| shift_right(row) | Increment all row numbers greater than or equal to the input row. |
| sort() | Make row order align with key order. |
| sorted_data() | Return rows in sorted order. |
Attributes Documentation
Methods Documentation
Add a new entry to the sorted array.
| Parameters: | key : tuple
row : int
|
|---|
Find all rows matching the given key.
| Parameters: | key : tuple
|
|---|---|
| Returns: | matching_rows : list
|
Return the index of the largest key in data greater than or equal to the given key, data pair.
| Parameters: | key : tuple
data : int
exact : bool
|
|---|
Retrieve all array items as a list of pairs of the form [(key, [row 1, row 2, ...]), ...]
Find values in the given range.
| Parameters: | lower : tuple
upper : tuple
bounds : tuple (x, y) of bools
|
|---|
Remove the given entry from the sorted array.
| Parameters: | key : tuple
data : int
|
|---|---|
| Returns: | successful : bool
|
Replace all rows with the values they map to in the given dictionary. Any rows not present as keys in the dictionary will have their entries deleted.
| Parameters: | row_map : dict
|
|---|
Decrement all row numbers greater than the input row.
| Parameters: | row : int
|
|---|
Increment all row numbers greater than or equal to the input row.
| Parameters: | row : int
|
|---|
Make row order align with key order.
Return rows in sorted order.