MCPcopy Index your code
hub / github.com/PyTables/PyTables / col

Method col

tables/table.py:2159–2179  ·  view source on GitHub ↗

Get a column from the table. If a column called name exists in the table, it is read and returned as a NumPy object. If it does not exist, a KeyError is raised. Examples -------- :: narray = table.col('var2') That statement is equivalen

(self, name: str)

Source from the content-addressed store, hash-verified

2157 )
2158
2159 def col(self, name: str) -> np.ndarray:
2160 """Get a column from the table.
2161
2162 If a column called name exists in the table, it is read and returned as
2163 a NumPy object. If it does not exist, a KeyError is raised.
2164
2165 Examples
2166 --------
2167 ::
2168
2169 narray = table.col('var2')
2170
2171 That statement is equivalent to::
2172
2173 narray = table.read(field='var2')
2174
2175 Here you can see how this method can be used as a shorthand for the
2176 :meth:`Table.read` method.
2177
2178 """
2179 return self.read(field=name)
2180
2181 def __getitem__(
2182 self, key: int | slice | list[int] | list[bool] | np.ndarray

Callers 4

test01Method · 0.80
test_copysortMethod · 0.80
collations.pyFile · 0.80

Calls 1

readMethod · 0.95

Tested by 3

test01Method · 0.64
test_copysortMethod · 0.64