### Initialize DataFrame and variables Source: https://juliadata.github.io/DataFramesMeta.jl/stable Setup for demonstrating multi-column operations. ```julia df = DataFrame(a = [11, 14], b = [17, 10], c = [12, 5]); vars = ["a", "b"]; ``` -------------------------------- ### Equivalent DataFrames.jl transformation Source: https://juliadata.github.io/DataFramesMeta.jl/stable This shows the equivalent DataFrames.jl transformation for the @byrow example, using the ByRow function wrapper explicitly. ```julia transform(df, :x => ByRow(x -> x == 1 ? true : false) => :y) ``` -------------------------------- ### Example of @passmissing with a custom function Source: https://juliadata.github.io/DataFramesMeta.jl/stable This example shows how @passmissing combined with @byrow allows a custom function 'no_missing' to correctly handle missing values during a transformation. ```julia no_missing(x::Int, y::Int) = x + y ``` ```julia df = DataFrame(a = [1, 2, missing], b = [4, 5, 6]) ``` ```julia @transform df @passmissing @byrow :c = no_missing(:a, :b) ``` -------------------------------- ### Row-wise parsing with @passmissing and @rtransform Source: https://juliadata.github.io/DataFramesMeta.jl/stable This example demonstrates using @passmissing with @rtransform to parse string values to integers, correctly handling missing string inputs by producing missing integer outputs. ```julia df = DataFrame(x_str = ["1", "2", missing]) ``` ```julia @rtransform df @passmissing :x = parse(Int, :x_str) ``` -------------------------------- ### Invalid multi-column expression Source: https://juliadata.github.io/DataFramesMeta.jl/stable Example of an unsupported expression involving mixed column selectors. ```julia [AsTable(cols), :x] => f => :y ``` ```julia :y = sum(AsTable(cols)) + :d ``` -------------------------------- ### Invalid multi-argument selector Source: https://juliadata.github.io/DataFramesMeta.jl/stable Example of an invalid usage where a multi-argument selector is used inside a function call. ```julia @select df :y = f($[:a, :b]) ``` -------------------------------- ### Unsupported subset selector Source: https://juliadata.github.io/DataFramesMeta.jl/stable Example of a function call that fails because the underlying DataFrames.jl function does not support vector inputs. ```julia subset(df, [:a, :b]) ``` ```julia @subset df $[:a, :b] ``` -------------------------------- ### Select multiple columns Source: https://juliadata.github.io/DataFramesMeta.jl/stable Demonstrates selecting multiple columns using vectors in DataFrames and DataFramesMeta. ```julia select(df, [:a, :b]) ``` ```julia @select df $[:a, :b] ``` -------------------------------- ### Create new columns using $ with dynamic names Source: https://juliadata.github.io/DataFramesMeta.jl/stable Demonstrates creating new columns with names provided as strings or variables using the `$` syntax within `@select` and `@by` macros. ```julia df = DataFrame(A = 1:3, B = [2, 1, 2]) newcol = "C" @select(df, $newcol = :A + :B) @by(df, :B, ("A complicated" * " new name") = first(:A)) nameC = "C" df3 = @eachrow df begin @newcol $nameC::Vector{Int} $nameC = :A end ``` -------------------------------- ### AsTable column selection Source: https://juliadata.github.io/DataFramesMeta.jl/stable Demonstration of column selection inside AsTable. ```julia :y = first(AsTable("a")) ``` -------------------------------- ### Select multiple columns using selectors Source: https://juliadata.github.io/DataFramesMeta.jl/stable Demonstrates using DataFrames.jl column selectors like Not, Between, and regex with @select. ```julia @select df Not(:x) @select df Between(:x, :y) @select df All() @select df Cols(r"x") # Regular expressions. ``` -------------------------------- ### Perform column selection and transformation with @select Source: https://juliadata.github.io/DataFramesMeta.jl/stable Shows how to use @select and @select! on DataFrames and GroupedDataFrames. ```julia df = DataFrame(x = [1, 1, 2, 2], y = [1, 2, 101, 102]); gd = @groupby(df, :x); @select(df, :x, :y) @select(df, :x2 = 2 * :x, :y) @select(gd, :x2 = 2 .* :y .* first(:y)) @select!(df, :x, :y) @select!(df, :x = 2 * :x, :y) @select!(gd, :y = 2 .* :y .* first(:y)) ``` -------------------------------- ### Compare DataFrames and DataFramesMeta syntax Source: https://juliadata.github.io/DataFramesMeta.jl/stable Demonstrates the more concise syntax of DataFramesMeta compared to standard DataFrames.jl functions. ```julia df = DataFrame(a = [1, 2], b = [3, 4]); # With DataFrames transform(df, [:a, :b] => ((x, y) -> x + y) => :c) # With DataFramesMeta @transform(df, :c = :a + :b) # With DataFrames subset(df, :a => ByRow(==(2))) # With DataFramesMeta @rsubset(df, :a == 2) ``` -------------------------------- ### Passing programmatic keyword arguments Source: https://juliadata.github.io/DataFramesMeta.jl/stable Shows how to pass keyword arguments as splatted Pairs to DataFramesMeta.jl macros. ```julia julia> df = DataFrame(x = [1, 1, 2, 2], b = [5, 6, 7, 8]); julia> my_kwargs = [:view => true, :skipmissing => false]; julia> @rsubset(df, :x == 1; my_kwargs...) 2×2 SubDataFrame Row │ x b │ Int64 Int64 ─────┼────────────── 1 │ 1 5 2 │ 1 6 julia> @rsubset df begin :x == 1 @kwarg my_kwargs... end 2×2 SubDataFrame Row │ x b │ Int64 Int64 ─────┼────────────── 1 │ 1 5 2 │ 1 6 ``` -------------------------------- ### Group and Combine with @by Source: https://juliadata.github.io/DataFramesMeta.jl/stable Perform grouping and aggregation in a single step using the @by macro. ```julia df = DataFrame(x = [1, 1, 2, 2], y = [1, 2, 101, 102]); @by df :x begin :y_sum = sum(:y) end ``` -------------------------------- ### Passing keyword arguments to DataFramesMeta.jl macros Source: https://juliadata.github.io/DataFramesMeta.jl/stable Demonstrates passing keyword arguments using the semicolon syntax or the @kwarg block syntax. ```julia julia> df = DataFrame(x = [1, 1, 2, 2], b = [5, 6, 7, 8]); julia> @rsubset(df, :x == 1 ; view = true) 2×2 SubDataFrame Row │ x b │ Int64 Int64 ─────┼────────────── 1 │ 1 5 2 │ 1 6 ``` ```julia julia> df = DataFrame(x = [1, 1, 2, 2], b = [5, 6, 7, 8]); julia> @rsubset df begin :x == 1 @kwarg view = true end 2×2 SubDataFrame Row │ x b │ Int64 Int64 ─────┼────────────── 1 │ 1 5 2 │ 1 6 ``` -------------------------------- ### Create multiple columns using function with AsTable Source: https://juliadata.github.io/DataFramesMeta.jl/stable Use a function to generate new columns based on input columns. ```julia julia> function fun_with_new_name(x::NamedTuple) nms = string.(propertynames(x)) new_name = Symbol(join(nms, "_"), "_sum") s = sum(x) (; new_name => s) end julia> @rtransform df $AsTable = fun_with_new_name(AsTable([:a, :b])) 2×4 DataFrame Row │ a b c a_b_sum │ Int64 Int64 Int64 Int64 ─────┼────────────────────────────── 1 │ 11 17 12 28 2 │ 14 10 5 24 ``` -------------------------------- ### Select columns with regex Source: https://juliadata.github.io/DataFramesMeta.jl/stable Uses a regular expression wrapped in $() to select columns matching a pattern. ```julia @select df $(r"^a") ``` -------------------------------- ### Using $() for src => fun => dest calls in DataFrames.jl Source: https://juliadata.github.io/DataFramesMeta.jl/stable Explains how wrapping arguments in `$()` bypasses DataFramesMeta.jl's anonymous function creation, allowing direct use of DataFrames.jl's `src => fun => dest` syntax for complex operations like applying multiple functions to multiple columns. ```julia using Statistics df = DataFrame(a = [1, 2], b = [30, 40]); @transform df $([:a, :b] .=> [sum mean]) ``` -------------------------------- ### Transform DataFrames with @transform and @transform! Source: https://juliadata.github.io/DataFramesMeta.jl/stable Use @transform to create a new DataFrame with added columns, or @transform! to mutate an existing one. These macros support keyword-like syntax for column transformations. ```julia df = DataFrame(x = [1, 1, 2, 2], y = [1, 2, 101, 102]); gd = @groupby(df, :x); @transform(df, :x2 = 2 * :x, :y) @transform(gd, :x2 = 2 .* :y .* first(:y)) @transform!(df, :x, :y) @transform!(df, :x = 2 * :x, :y) @transform!(gd, :y = 2 .* :y .* first(:y)) ``` -------------------------------- ### Referencing columns with complex expressions using $() Source: https://juliadata.github.io/DataFramesMeta.jl/stable Shows how to reference columns involved in more complex expressions by wrapping the column reference in parentheses, like `$("a column name" * " in two parts")` or `$(get_column_name(x))`. ```julia @transform df :a + $("a column name" * " in two parts") @transform df :a + $(get_column_name(x)) ``` -------------------------------- ### Accessing column notes with note() Source: https://juliadata.github.io/DataFramesMeta.jl/stable The note function retrieves all stacked notes for a given column. Notes are returned as a single string with newline separators. ```julia note(df, :wage) ``` -------------------------------- ### Sum columns using AsTable with variable list Source: https://juliadata.github.io/DataFramesMeta.jl/stable Calculate the sum of columns specified in a variable list. ```julia julia> @rtransform df :y = sum(AsTable(vars)) 2×4 DataFrame Row │ a b c y │ Int64 Int64 Int64 Int64 ─────┼──────────────────────────── 1 │ 11 17 12 28 2 │ 14 10 5 24 ``` -------------------------------- ### Row-wise subsetting with @subset and @byrow Source: https://juliadata.github.io/DataFramesMeta.jl/stable Demonstrates using @byrow within the @subset macro to filter rows based on conditions applied to individual columns. ```julia @subset df @byrow begin :a > 1 :b < 5 end ``` -------------------------------- ### Transformation expression mapping Source: https://juliadata.github.io/DataFramesMeta.jl/stable Conceptual mapping of transformation syntax to DataFrames.jl source expressions. ```julia :y = f(AsTable(cols)) ``` ```julia AsTable(cols) => f => :y ``` -------------------------------- ### Creating multiple columns with @astable Source: https://juliadata.github.io/DataFramesMeta.jl/stable Uses @astable to generate multiple new columns from intermediate calculations within a single operation. ```julia julia> df = DataFrame(a = [1, 2, 3], b = [400, 500, 600]); julia> @transform df @astable begin ex = extrema(:b) :b_first = :b .- first(ex) :b_last = :b .- last(ex) end 3×4 DataFrame Row │ a b b_first b_last │ Int64 Int64 Int64 Int64 ─────┼─────────────────────────────── 1 │ 1 400 0 -200 2 │ 2 500 100 -100 3 │ 3 600 200 0 ``` -------------------------------- ### Sum columns using AsTable with Symbols Source: https://juliadata.github.io/DataFramesMeta.jl/stable Calculate the sum of columns specified directly as Symbols. ```julia julia> @rtransform df :y = sum(AsTable([:a, :b])) 2×4 DataFrame Row │ a b c y │ Int64 Int64 Int64 Int64 ─────┼──────────────────────────── 1 │ 11 17 12 28 2 │ 14 10 5 24 ``` -------------------------------- ### DataFramesMeta $ with Symbol and String column references Source: https://juliadata.github.io/DataFramesMeta.jl/stable Illustrates that DataFramesMeta allows mixing Symbols and strings for column references in macros like `@transform`, unlike the base DataFrames.jl. ```julia @transform(df, :y = :A + $"B") ``` -------------------------------- ### Rename Columns with @rename Source: https://juliadata.github.io/DataFramesMeta.jl/stable Rename columns using the :new = :old syntax. Supports both single-argument and block formats. ```julia df = DataFrame(x = [1, 1, 2, 2], y = [1, 2, 101, 102]); @rename df :x_new = :x @rename(df, :x_new = :x) @rename df $"Name with spaces" = :y @rename df begin :x_new = :x :y_new = :y end ``` -------------------------------- ### Subset with transformation Source: https://juliadata.github.io/DataFramesMeta.jl/stable Uses $() to pass a transformation pair to the @subset macro. ```julia julia> @subset df $(:a => t -> t .>= 2) 1×2 DataFrame Row │ a b │ Int64 Int64 ─────┼────────────── 1 │ 2 4 ``` -------------------------------- ### Attaching column notes with @note! Source: https://juliadata.github.io/DataFramesMeta.jl/stable Use @note! to attach detailed notes to DataFrame columns, which can be stacked to record data cleaning steps or provide in-depth information. ```julia @note! df :wage = "Hourly wage from 2015 American Community Survey (ACS)" ``` ```julia @rtransform! df :wage = :wage == -99 ? 0 : :wage @note! df :wage = "Individuals with no job are recorded as 0 wage" ``` -------------------------------- ### Allocating New Columns with @newcol in @eachrow Source: https://juliadata.github.io/DataFramesMeta.jl/stable The @eachrow macro supports allocating new columns using the @newcol syntax, specifying the column name and its container type. This is useful for data transformations. ```julia df = DataFrame(A = 1:3, B = [2, 1, 2]) df2 = @eachrow df begin @newcol :colX::Vector{Float64} @newcol :colY::Vector{Union{Int,Missing}} :colX = :B == 2 ? pi * :A : :B if :A > 1 :colY = :A * :B else :colY = missing end end ``` -------------------------------- ### Summarize Data with @combine Source: https://juliadata.github.io/DataFramesMeta.jl/stable Aggregate data by performing transformations at the group level. Requires a DataFrame or GroupedDataFrame as the first argument. ```julia df = DataFrame(x = [1, 1, 2, 2], y = [1, 2, 101, 102]); gd = @groupby(df, :x); @combine(gd, :x2 = sum(:y)) @combine(gd, :x2 = :y .- sum(:y)) @combine(gd, $AsTable = (n1 = sum(:y), n2 = first(:y))) ``` ```julia df = DataFrame(x = [1, 1, 2, 2], y = [1, 2, 101, 102]); gd = groupby(df, :x); @combine(gd, $AsTable = (a = sum(:x), b = sum(:y))) ``` -------------------------------- ### printnotes(df, cols, unnoted) Source: https://juliadata.github.io/DataFramesMeta.jl/stable Prints the notes and labels associated with columns in a DataFrame. ```APIDOC ## printnotes(df, cols, unnoted) ### Description Prints the notes and labels of columns in a data frame. ### Parameters #### Arguments - **df** (DataFrame) - Required - The DataFrame containing the columns to inspect. - **cols** (AbstractVector) - Optional - Determines which columns to print. #### Keyword Arguments - **unnoted** (Bool) - Optional - Controls whether to print columns without user-defined notes. ### Request Example ```julia printnotes(df) printnotes(df, [:wage], unnoted=false) ``` ``` -------------------------------- ### Valid column type mixing in DataFramesMeta macros Source: https://juliadata.github.io/DataFramesMeta.jl/stable Demonstrates valid usage of `$` for column references in DataFramesMeta macros where integer positions are mixed, such as in `@eachrow` and `@with`. ```julia @eachrow df begin $1 + $2 end @with df begin $1 + $2 end ``` -------------------------------- ### Using _ placeholder in @chain Source: https://juliadata.github.io/DataFramesMeta.jl/stable The placeholder `_` in @chain allows you to refer to the result of the previous expression when it's not intended to be the first argument of the current function. ```julia # Get the sum of all columns after # a few transformations @chain df begin @transform(:y = 10 .* :x) @subset(:a .> 2) @select(:a, :y, :x) reduce(+, eachcol(_)) end ``` -------------------------------- ### Attaching column labels with @label! Source: https://juliadata.github.io/DataFramesMeta.jl/stable Use @label! to assign short, informative labels to DataFrame columns. This is useful for enhancing the readability of printed DataFrames. ```julia df = DataFrame(wage = [16, 25, 14, 23]); @label! df :wage = "Wage (2015 USD)" ``` ```julia df = DataFrame(wage = [12], age = [23]); @label! df :wage = "Hourly wage (2015 USD)"; printlabels(df) printlabels(df, [:wage, :age]; unlabelled = false) ``` -------------------------------- ### Handling Return Statements within @with Source: https://juliadata.github.io/DataFramesMeta.jl/stable Be cautious with 'return' inside @with as it applies to the anonymous function created by @with, not the parent function scope. This can lead to unexpected return values. ```julia function data_transform(df; returnearly = true) if returnearly @with df begin z = :x + :y return z end else return [1, 2, 3] end return [4, 5, 6] end ``` -------------------------------- ### Using @eachrow for Row-wise Transformations Source: https://juliadata.github.io/DataFramesMeta.jl/stable The @eachrow macro processes each row of a DataFrame, creating a new DataFrame. It supports control flow and 'begin end' blocks. Assignments within @eachrow require a 'let' block to create a local scope. ```julia df = DataFrame(A = 1:3, B = [2, 1, 2], C = [-4,2,1]) let x = 0.0 @eachrow df begin if :A < :B x += :A * :C end end x end ``` -------------------------------- ### DataFramesMeta column type mixing restrictions with $ Source: https://juliadata.github.io/DataFramesMeta.jl/stable Highlights that mixing integer column references with Symbols or strings in `@eachrow` or `@with` macros will cause errors, while mixing Symbols and strings is permitted. ```julia df = DataFrame(A = 1:3, B = [2, 1, 2]) @eachrow df begin :A = $2 end @with df begin $1 + $"A" end ``` -------------------------------- ### Print Column Notes in DataFrame Source: https://juliadata.github.io/DataFramesMeta.jl/stable Use `printnotes` to display the labels and notes associated with columns in a DataFrame. The `cols` argument can specify which columns to include, and `unnoted` controls the display of columns without user-defined notes. ```julia julia> df = DataFrame(wage = [12], age = [23]); julia> @label! df :age = "Age (years)"; julia> @note! df :wage = "Derived from American Community Survey"; julia> @note! df :wage = "Missing values imputed as 0 wage"; julia> @label! df :wage = "Hourly wage (2015 USD)"; julia> printnotes(df) Column: wage ──────────── Label: Hourly wage (2015 USD) Derived from American Community Survey Missing values imputed as 0 wage Column: age ─────────── Label: Age (years) ``` -------------------------------- ### Using @aside in @chain Source: https://juliadata.github.io/DataFramesMeta.jl/stable The @aside macro-flag within @chain allows performing operations and storing intermediate results without affecting the main chain of operations. ```julia @chain df begin @transform :y = 10 .* :x @aside y_mean = mean(_.y) # From Chain.jl, not DataFramesMeta.jl @select :y_standardize = :y .- y_mean end ``` -------------------------------- ### Pass transformation pairs Source: https://juliadata.github.io/DataFramesMeta.jl/stable Uses $() to pass transformation pairs directly to DataFrames.jl. ```julia julia> df = DataFrame(a = [1, 2], b = [3, 4]); julia> my_transformation = :a => (t -> t .+ 100) => :c; julia> @transform df begin $my_transformation :d = :b .+ 200 end 2×4 DataFrame Row │ a b c d │ Int64 Int64 Int64 Int64 ─────┼──────────────────────────── 1 │ 1 3 101 203 2 │ 2 4 102 204 ``` -------------------------------- ### Chaining operations with @chain Source: https://juliadata.github.io/DataFramesMeta.jl/stable Use @chain to connect multiple DataFrame operations sequentially. The result of each operation is passed as the first argument to the next. ```julia using Statistics df = DataFrame(a = repeat(1:5, outer = 20), b = repeat(["a", "b", "c", "d"], inner = 25), x = repeat(1:20, inner = 5)) x_thread = @chain df begin @transform(:y = 10 * :x) @subset(:a .> 2) @by(:b, :meanX = mean(:x), :meanY = mean(:y)) @orderby(:meanX) @select(:meanX, :meanY, :var = :b) end ``` -------------------------------- ### Subset Rows with @subset and @subset! Source: https://juliadata.github.io/DataFramesMeta.jl/stable Filter rows based on conditions. @subset returns a new DataFrame, while @subset! modifies the input in-place. ```julia using Statistics df = DataFrame(x = [1, 1, 2, 2], y = [1, 2, 101, 102]); gd = @groupby(df, :x); outside_var = 1; @subset(df, :x .> 1) @subset(df, :x .> outside_var) @subset(df, :x .> outside_var, :y .< 102) # the two expressions are "and-ed" @subset(df, in.(:y, Ref([101, 102]))) # pick rows with values found in a reference list @rsubset(df, :y in [101, 102]) # the same with @rsubset - explained below; broadcasting is not needed @subset(gd, :x .> mean(:x)) ``` -------------------------------- ### Transform DataFrame using $ with Symbol and String column names Source: https://juliadata.github.io/DataFramesMeta.jl/stable Use `$` to refer to columns by Symbol or string variable in `@transform`. This allows dynamic column selection for transformations. ```julia df = DataFrame(A = 1:3, :B = [2, 1, 2]) nameA = :A df2 = @transform(df, :C = :B - $nameA) nameA_string = "A" df3 = @transform(df, :C = :B - $nameA_string) nameB = "B" df4 = @eachrow df begin :A = $nameB end ``` -------------------------------- ### Using @with for Scoped DataFrame Operations Source: https://juliadata.github.io/DataFramesMeta.jl/stable The @with macro creates a scope where symbols are aliases for DataFrame columns. Variables in the parent scope can be read, but assignment behavior depends on the parent scope's type (global or local). ```julia df = DataFrame(x = 1:3, y = [2, 1, 2]) x = [2, 1, 0] @with(df, :y .+ 1) @with(df, :x + x) # the two x's are different ``` ```julia x = @with df begin res = 0.0 for i in 1:length(:x) res += :x[i] * :y[i] end res end ``` ```julia @with(df, df[:x .> 1, ^(:y)]) # The ^ means leave the :y alone ``` -------------------------------- ### Accessing column labels with label() Source: https://juliadata.github.io/DataFramesMeta.jl/stable The label function from TablesMetaDataTools.jl allows you to retrieve the label associated with a specific column. ```julia label(df, :wage) ``` -------------------------------- ### Removing all notes from a column Source: https://juliadata.github.io/DataFramesMeta.jl/stable To clear all notes associated with a column, use the note! function with an empty string and append = false. ```julia note!(df, :wage, ""; append = false) ``` -------------------------------- ### Sort Rows with @orderby Source: https://juliadata.github.io/DataFramesMeta.jl/stable Sort DataFrame rows based on column values or transformations. Only applicable to DataFrames. ```julia df = DataFrame(x = [1, 1, 2, 2], y = [1, 2, 101, 102]); @orderby(df, -1 .* :x) @orderby(df, :x, :y .- mean(:y)) ``` -------------------------------- ### Use symbols without column aliasing Source: https://juliadata.github.io/DataFramesMeta.jl/stable Uses the ^ operator to prevent a symbol from being interpreted as a column reference. ```julia df = DataFrame(x = [1, 1, 2, 2], y = [1, 2, 101, 102]); @select(df, :x2 = :x, :x3 = ^(:x)) ``` -------------------------------- ### DataFrames.jl column type mixing restriction Source: https://juliadata.github.io/DataFramesMeta.jl/stable Shows how DataFrames.jl requires source column identifiers to be of the same type in `src => fun => dest` pairs, leading to errors when mixing types like Symbol and Integer. ```julia transform(df, [:A, 2] => (+) => :y) ``` -------------------------------- ### Subset rows based on AsTable sum Source: https://juliadata.github.io/DataFramesMeta.jl/stable Filter rows where the sum of columns exceeds a threshold. ```julia julia> @rsubset df sum(AsTable(vars)) > 25 1×3 DataFrame Row │ a b c │ Int64 Int64 Int64 ─────┼───────────────────── 1 │ 11 17 12 ``` -------------------------------- ### Apply row-wise operation with @byrow Source: https://juliadata.github.io/DataFramesMeta.jl/stable Use @byrow within DataFramesMeta.jl macros to apply operations row by row without manual vectorization. It creates an anonymous function wrapped in ByRow. ```julia @transform(df, @byrow :y = :x == 1 ? true : false) ``` -------------------------------- ### Modifying DataFrame Rows with @eachrow! Source: https://juliadata.github.io/DataFramesMeta.jl/stable The @eachrow! macro modifies a DataFrame in-place, applying transformations to each row. It is an in-place version of @eachrow. ```julia df = DataFrame(A = 1:3, B = [2, 1, 2]) df2 = @eachrow df begin :A = :B + 1 end ``` -------------------------------- ### Propagate missing values with @passmissing Source: https://juliadata.github.io/DataFramesMeta.jl/stable Use @passmissing within row-wise transformations to ensure that functions return missing if any input argument is missing. This is useful for functions that do not automatically handle missing values. ```julia @transform df @byrow @passmissing :c = f(:a, :b) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.