KeyCollisionFunction
✖
KeyCollisionFunction
is an option for JoinAcross that specifies how to handle pairs of elements that are not being joined but nevertheless have the same key.
Details

- Possible settings for KeyCollisionFunction include:
-
None drop both elements Left include only the left element (default) Right include only the right element func apply func to generate a pair of new keys
Examples
Basic Examples (4)Summary of the most common use cases
When a matching key b is not used for joining, the left value for this key is used by default:

https://wolfram.com/xid/08vkq0hto4w8jgy-dljf3l

Use KeyCollisionFunction to specify which value of the colliding key should be returned:

https://wolfram.com/xid/08vkq0hto4w8jgy-ndrj3a

Generate new keys instead of a colliding key:

https://wolfram.com/xid/08vkq0hto4w8jgy-ep952


https://wolfram.com/xid/08vkq0hto4w8jgy-ig3736

Specify which values to take for colliding keys:

https://wolfram.com/xid/08vkq0hto4w8jgy-nsj666

Specifically pick the right values for colliding keys:

https://wolfram.com/xid/08vkq0hto4w8jgy-bl3ikg

Wolfram Research (2015), KeyCollisionFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/KeyCollisionFunction.html.
Text
Wolfram Research (2015), KeyCollisionFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/KeyCollisionFunction.html.
Wolfram Research (2015), KeyCollisionFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/KeyCollisionFunction.html.
CMS
Wolfram Language. 2015. "KeyCollisionFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/KeyCollisionFunction.html.
Wolfram Language. 2015. "KeyCollisionFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/KeyCollisionFunction.html.
APA
Wolfram Language. (2015). KeyCollisionFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KeyCollisionFunction.html
Wolfram Language. (2015). KeyCollisionFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KeyCollisionFunction.html
BibTeX
@misc{reference.wolfram_2025_keycollisionfunction, author="Wolfram Research", title="{KeyCollisionFunction}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KeyCollisionFunction.html}", note=[Accessed: 28-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_keycollisionfunction, organization={Wolfram Research}, title={KeyCollisionFunction}, year={2015}, url={https://reference.wolfram.com/language/ref/KeyCollisionFunction.html}, note=[Accessed: 28-May-2025
]}