Last modified: December 2015

URL: http://cxc.harvard.edu/ciao/ahelp/col_exists.html
Jump to: Description · Example · Bugs · See Also


AHELP for CIAO 4.11

col_exists

Context: crates

Synopsis

Determine if a column exists in a crate.

Syntax

col_exists(crate, name)

Description

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.


Example

>>> 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.


Bugs

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

Refer to the CIAO bug pages for an up-to-date listing of known issues.

See Also

contrib
add_colvals
crates
add_col, copy_colvals, delete_col, get_col, get_col_names, get_colvals, get_number_cols, is_pha, is_rmf, is_virtual, key_exists, set_colvals