ColumnKeyExistsQ

ColumnKeyExistsQ[data,key]

returns True if the specified key exists in the tabular data, and False otherwise.

ColumnKeyExistsQ[key]

represents an operator form of ColumnKeyExistsQ that can be applied to an expression.

Details

Examples

open allclose all

Basic Examples  (1)

Check whether a column key exists in a Tabular object:

Scope  (7)

Data Forms  (5)

Check the presence of a column key in a Tabular object:

For a Tabular object without column keys, ColumnKeyExistsQ always returns False:

Check the presence of a key in any of the associations of a list of them:

ColumnKeyExistsQ effectively assumes Missing[] values, as Tabular would do:

Check the presence of a column key in a Dataset object:

Use ColumnKeyExistsQ as an operator form:

Key Forms  (2)

Check whether a given column key is present in a Tabular object:

The key in ColumnKeyExistsQ[tab,key] can be wrapped in Key or ExtendedKey:

Take a Tabular object with extended column keys:

Check whether a given extended key is present:

Extended keys can be addressed by their last argument if they are unique:

Properties & Relations  (2)

ColumnKeyExistsQ[tab,key] is equivalent to MemberQ[ColumnKeys[tab],key]:

For a list assocs of associations, ColumnKeyExistsQ[assocs,key] is equivalent to using KeyExistsQ in the associations:

ColumnKeyExistsQ returns True if the key exists in any of the associations:

Wolfram Research (2025), ColumnKeyExistsQ, Wolfram Language function, https://reference.wolfram.com/language/ref/ColumnKeyExistsQ.html.

Text

Wolfram Research (2025), ColumnKeyExistsQ, Wolfram Language function, https://reference.wolfram.com/language/ref/ColumnKeyExistsQ.html.

CMS

Wolfram Language. 2025. "ColumnKeyExistsQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ColumnKeyExistsQ.html.

APA

Wolfram Language. (2025). ColumnKeyExistsQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ColumnKeyExistsQ.html

BibTeX

@misc{reference.wolfram_2024_columnkeyexistsq, author="Wolfram Research", title="{ColumnKeyExistsQ}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ColumnKeyExistsQ.html}", note=[Accessed: 15-January-2025 ]}

BibLaTeX

@online{reference.wolfram_2024_columnkeyexistsq, organization={Wolfram Research}, title={ColumnKeyExistsQ}, year={2025}, url={https://reference.wolfram.com/language/ref/ColumnKeyExistsQ.html}, note=[Accessed: 15-January-2025 ]}