(
self, sortby: Column | str, check_csi: bool
)
| 1754 | return row._iter(start, stop, step, coords=sequence) |
| 1755 | |
| 1756 | def _check_sortby_csi( |
| 1757 | self, sortby: Column | str, check_csi: bool |
| 1758 | ) -> Index: |
| 1759 | if isinstance(sortby, Column): |
| 1760 | icol = sortby |
| 1761 | elif isinstance(sortby, str): |
| 1762 | icol = self.cols._f_col(sortby) |
| 1763 | else: |
| 1764 | raise TypeError( |
| 1765 | f"`sortby` can only be a `Column` or string object, " |
| 1766 | f"but you passed an object of type: {type(sortby)}" |
| 1767 | ) |
| 1768 | if icol.is_indexed and icol.index.kind == "full": |
| 1769 | if check_csi and not icol.index.is_csi: |
| 1770 | # The index exists, but it is not a CSI one. |
| 1771 | raise ValueError( |
| 1772 | "Field `{sortby}` must have associated a CSI index " |
| 1773 | "in table `{self}`, but the existing one is not. " |
| 1774 | ) |
| 1775 | return icol.index |
| 1776 | else: |
| 1777 | raise ValueError( |
| 1778 | f"Field `{sortby}` must have associated a 'full' index " |
| 1779 | f"in table `{self}`." |
| 1780 | ) |
| 1781 | |
| 1782 | def itersorted( |
| 1783 | self, |
no test coverage detected