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:
  • Nonedrop both elements
    Leftinclude only the left element (default)
    Rightinclude only the right element
    funcapply func to generate a pair of new keys

Examples

Basic Examples  (4)

When a matching key b is not used for joining, the left value for this key is used by default:

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

Generate new keys instead of a colliding key:

Omit colliding keys:

Specify which values to take for colliding keys:

Specifically pick the right values for colliding keys:

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.

CMS

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

BibTeX

@misc{reference.wolfram_2023_keycollisionfunction, author="Wolfram Research", title="{KeyCollisionFunction}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KeyCollisionFunction.html}", note=[Accessed: 19-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_keycollisionfunction, organization={Wolfram Research}, title={KeyCollisionFunction}, year={2015}, url={https://reference.wolfram.com/language/ref/KeyCollisionFunction.html}, note=[Accessed: 19-April-2024 ]}