KeyIntersection

KeyIntersection[{assoc1,assoc2,}]

产生一个关联列表,其中只保留键出现在所有 associ 中的元素.

更多信息

  • KeyIntersection 返回一个关联列表,其中,所有关联中的键按相同方式排列.
  • 键按照在 associ 序列中第一次出现的顺序排列.
  • KeyIntersection 不止可以用于 Association 对象,也可以用于规则列表.

范例

基本范例  (4)

生成具有共同键的关联列表:

从列表中生成关联:

从混合列表中生成关联:

KeyIntersection 将键按照相同顺序重新排序:

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

文本

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_keyintersection, author="Wolfram Research", title="{KeyIntersection}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/KeyIntersection.html}", note=[Accessed: 18-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_keyintersection, organization={Wolfram Research}, title={KeyIntersection}, year={2014}, url={https://reference.wolfram.com/language/ref/KeyIntersection.html}, note=[Accessed: 18-November-2024 ]}