Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
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.9

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

Last modified: December 2015
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.