RowKey

RowKey[{key1,key2,}]

表示一个键,可用于提取 Tabular 对象中关键列的值为 keyi 的行.

更多信息

  • RowKey 通常用于获取 Tabular 对象的行.
  • 对于给定的 Tabular 对象, RowKey[{key1,key2,}] 中的 keyi 列表必须唯一指定每一行.
  • RowKey[key] 被理解为 RowKey[{key}].
  • RowKey[][tab] is equivalent to tab[RowKey[]] for a Tabular object tab.

范例

打开所有单元关闭所有单元

基本范例  (1)

创建有三个列的 Tabular 对象:

将其中之一设置为关键列,以允许按该列建立索引:

提取关键列含有 "b" 的行:

也可以将 RowKey[] 用作函数:

范围  (3)

Create a Tabular object with a key column:

Extract the row containing "a" in the key column:

The List wrapper is not needed when there is a single key column:

Use RowKey[] as a function acting on a Tabular object:

取一个含有 G7 国家人口的 Tabular 对象:

将两列设置为关键列:

RowKey 提取给定列的值:

应用  (1)

Take tabular data of fatal collisions for each state:

There are no key columns specified:

Reorder the columns and set the "state" column as key column:

Extract the rows for US Midwest states:

属性和关系  (4)

Take a Tabular object with a key column:

Row extraction can be performed with RowKey:

Key wrappers can also be used to extract a tabular row:

Keys of a Tabular object returns a list of RowKey expressions if key columns are specified:

For multiple key columns:

RowKey[{key1,key2,}] allows indexing rows by the values of multiple key columns:

ExtendedKey[key1,key2,] allows specifying columns by multiple values:

RowKey can contain keys corresponding to columns specified by ExtendedKey objects:

Wolfram Research (2025),RowKey,Wolfram 语言函数,https://reference.wolfram.com/language/ref/RowKey.html.

文本

Wolfram Research (2025),RowKey,Wolfram 语言函数,https://reference.wolfram.com/language/ref/RowKey.html.

CMS

Wolfram 语言. 2025. "RowKey." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/RowKey.html.

APA

Wolfram 语言. (2025). RowKey. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/RowKey.html 年

BibTeX

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

BibLaTeX

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