Column.zip
zipthatfunctionskip_nothingexpected_value_type
Aliases: combine, join by row position, merge
Documentation
Applies function to consecutive pairs of elements of self and that and returns a column of results.
Arguments
that: The column to zip withself.function: A binary function that is applied to corresponding pairs of elements ofselfandthatto produce a value.skip_nothing: controls whether missing values should be passed to thefunction. The default value ofTruewill skip the rows for which the value in either column is missing and automatically appendNothingto the result table. If set toFalse, every pair of values is passed tofunction.expected_value_type: The expected value type of the resulting column. IfAuto, the value type will be inferred from the values returned byfunction.
Examples
Zip two columns together as pairs.
import Standard.Examples
example_zip =
Examples.integer_column.zip Examples.text_column_1 [_, _]
Errors
- If any of the values returned by
functiondo not fit the expected value type, anInvalid_Value_Typeerror is raised. - If the
functionraises a dataflow error on any row, the first such error is propagated. - If an invocation of the
functionreturns a value with warnings, these warnings are attached to the overall result.