          Determine if a column exists in a crate.

col_exists(crate, name)

Argument
Description
crate
The table crate.
colname
The column name (case insensitive).

The col_exists command returns True if the column exists and False if not. The name comparison is case-insensitive.

The get_col_names routine can be used to find the columns in a Crate.

>>> cr = read_file("evt2.fits")
>>> col_exists(cr, "ENERGY")
True
>>> col_exists(cr, "energy")
True

Note that the check is case-insensitive on the column name.

See the bug pages on the CIAO website for an up-to-date listing of known bugs.

December 2015