ColumnKeyExistsQ
✖
ColumnKeyExistsQ
returns True if the specified key exists in the tabular data, and False otherwise.
represents an operator form of ColumnKeyExistsQ that can be applied to an expression.
Details
- Possible forms of data in ColumnKeyExistsQ[data,key] include:
-
Tabular[…] tabular data as a list of typed columns Dataset[…] general hierarchical data {assoc1,assoc2,…} list of associations with common keys - ColumnKeyExistsQ[key][data] is equivalent to ColumnKeyExistsQ[data,key].
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Check whether a column key exists in a Tabular object:
https://wolfram.com/xid/0bnhtm2fn3car-rc2umd
https://wolfram.com/xid/0bnhtm2fn3car-u4dyi9
https://wolfram.com/xid/0bnhtm2fn3car-jvpwu1
Scope (7)Survey of the scope of standard use cases
Data Forms (5)
Check the presence of a column key in a Tabular object:
https://wolfram.com/xid/0bnhtm2fn3car-m4loj6
https://wolfram.com/xid/0bnhtm2fn3car-hig9fm
https://wolfram.com/xid/0bnhtm2fn3car-q7v6c9
For a Tabular object without column keys, ColumnKeyExistsQ always returns False:
https://wolfram.com/xid/0bnhtm2fn3car-gt97ve
https://wolfram.com/xid/0bnhtm2fn3car-x3hd8h
https://wolfram.com/xid/0bnhtm2fn3car-wjc406
https://wolfram.com/xid/0bnhtm2fn3car-1mz4jh
Check the presence of a key in any of the associations of a list of them:
https://wolfram.com/xid/0bnhtm2fn3car-in5atx
https://wolfram.com/xid/0bnhtm2fn3car-7115qs
https://wolfram.com/xid/0bnhtm2fn3car-sq64rs
https://wolfram.com/xid/0bnhtm2fn3car-6cxlvn
https://wolfram.com/xid/0bnhtm2fn3car-2z5sxe
ColumnKeyExistsQ effectively assumes Missing[…] values, as Tabular would do:
https://wolfram.com/xid/0bnhtm2fn3car-dfjo26
Check the presence of a column key in a Dataset object:
https://wolfram.com/xid/0bnhtm2fn3car-6y70t2
https://wolfram.com/xid/0bnhtm2fn3car-l4kta7
https://wolfram.com/xid/0bnhtm2fn3car-dk7wi
Use ColumnKeyExistsQ as an operator form:
https://wolfram.com/xid/0bnhtm2fn3car-w5kqk7
https://wolfram.com/xid/0bnhtm2fn3car-fnn0md
https://wolfram.com/xid/0bnhtm2fn3car-2r70bv
Key Forms (2)
Check whether a given column key is present in a Tabular object:
https://wolfram.com/xid/0bnhtm2fn3car-sx5lc7
https://wolfram.com/xid/0bnhtm2fn3car-4oetfv
The key in ColumnKeyExistsQ[tab,key] can be wrapped in Key or ExtendedKey:
https://wolfram.com/xid/0bnhtm2fn3car-8yht23
https://wolfram.com/xid/0bnhtm2fn3car-tiovt
Take a Tabular object with extended column keys:
https://wolfram.com/xid/0bnhtm2fn3car-wtzc2i
Check whether a given extended key is present:
https://wolfram.com/xid/0bnhtm2fn3car-rphx2v
https://wolfram.com/xid/0bnhtm2fn3car-7m63tj
Extended keys can be addressed by their last argument if they are unique:
https://wolfram.com/xid/0bnhtm2fn3car-txdn4a
https://wolfram.com/xid/0bnhtm2fn3car-v7ve2k
Properties & Relations (2)Properties of the function, and connections to other functions
ColumnKeyExistsQ[tab,key] is equivalent to MemberQ[ColumnKeys[tab],key]:
https://wolfram.com/xid/0bnhtm2fn3car-ekrh7j
https://wolfram.com/xid/0bnhtm2fn3car-kokkz6
https://wolfram.com/xid/0bnhtm2fn3car-5r0czr
https://wolfram.com/xid/0bnhtm2fn3car-6xwttg
For a list assocs of associations, ColumnKeyExistsQ[assocs,key] is equivalent to using KeyExistsQ in the associations:
https://wolfram.com/xid/0bnhtm2fn3car-n85osa
https://wolfram.com/xid/0bnhtm2fn3car-zfealj
https://wolfram.com/xid/0bnhtm2fn3car-1gorg0
ColumnKeyExistsQ returns True if the key exists in any of the associations:
https://wolfram.com/xid/0bnhtm2fn3car-kdq94t
https://wolfram.com/xid/0bnhtm2fn3car-jwx5x
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.
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.
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
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: 23-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: 23-January-2025
]}