AssociationThread

AssociationThread[{key1,key2,}{val1,val2,}]

给出关联 key1val1,key2val2,.

AssociationThread[{key1,key2,},{val1,val2,}]

也给出关联 key1val1,key2val2,.

更多信息

  • 如果任何 keyi 有重复,后来出现的重复键将取代较早出现的键.
  • AssociationThread[keys:>values] 生成一个关联,其中每个元素使用延迟规则.

范例

基本范例  (3)

从两个列表创建关联:

较早出现的重复键被取代:

创建具有延迟值的关联:

得到当前日期和温度:

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

文本

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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