Get the row coordinates fulfilling the given condition. The coordinates are returned as a list of the current flavor. sort means that you want to retrieve the coordinates ordered. The default is to not sort them. The meaning of the other arguments is the same as in
(
self,
condition: str,
condvars: dict[str, Column | np.ndarray] | None = None,
sort: bool = False,
start: str | None = None,
stop: str | None = None,
step: str | None = None,
)
| 1699 | return nrows |
| 1700 | |
| 1701 | def get_where_list( |
| 1702 | self, |
| 1703 | condition: str, |
| 1704 | condvars: dict[str, Column | np.ndarray] | None = None, |
| 1705 | sort: bool = False, |
| 1706 | start: str | None = None, |
| 1707 | stop: str | None = None, |
| 1708 | step: str | None = None, |
| 1709 | ) -> np.ndarray: |
| 1710 | """Get the row coordinates fulfilling the given condition. |
| 1711 | |
| 1712 | The coordinates are returned as a list of the current flavor. sort |
| 1713 | means that you want to retrieve the coordinates ordered. The default is |
| 1714 | to not sort them. |
| 1715 | |
| 1716 | The meaning of the other arguments is the same as in the |
| 1717 | :meth:`Table.where` method. |
| 1718 | |
| 1719 | """ |
| 1720 | self._g_check_open() |
| 1721 | |
| 1722 | coords = [ |
| 1723 | p.nrow for p in self._where(condition, condvars, start, stop, step) |
| 1724 | ] |
| 1725 | coords = np.array(coords, dtype=SizeType) |
| 1726 | # Reset the conditions |
| 1727 | self._where_condition = None |
| 1728 | if sort: |
| 1729 | coords = np.sort(coords) |
| 1730 | return internal_to_flavor(coords, self.flavor) |
| 1731 | |
| 1732 | def itersequence(self, sequence: Sequence) -> Iterator[tableextension.Row]: |
| 1733 | """Iterate over a sequence of row coordinates.""" |