Get the enumerated type associated with the named column. If the column named colname (a string) exists and is of an enumerated type, the corresponding Enum instance (see :ref:`EnumClassDescr`) is returned. If it is not of an enumerated type, a TypeError is raised. If
(self, colname: str)
| 2138 | return internal_to_flavor(result, self.flavor) |
| 2139 | |
| 2140 | def get_enum(self, colname: str) -> Enum: |
| 2141 | """Get the enumerated type associated with the named column. |
| 2142 | |
| 2143 | If the column named colname (a string) exists and is of an enumerated |
| 2144 | type, the corresponding Enum instance (see :ref:`EnumClassDescr`) is |
| 2145 | returned. If it is not of an enumerated type, a TypeError is raised. If |
| 2146 | the column does not exist, a KeyError is raised. |
| 2147 | |
| 2148 | """ |
| 2149 | self._check_column(colname) |
| 2150 | |
| 2151 | try: |
| 2152 | return self._colenums[colname] |
| 2153 | except KeyError: |
| 2154 | raise TypeError( |
| 2155 | "column ``%s`` of table ``%s`` is not of an enumerated type" |
| 2156 | % (colname, self._v_pathname) |
| 2157 | ) |
| 2158 | |
| 2159 | def col(self, name: str) -> np.ndarray: |
| 2160 | """Get a column from the table. |
no outgoing calls