with_columns_var#

SingleCell.with_columns_var(*exprs, **named_exprs)[source]#

Equivalent to df.with_columns() from polars, but applied to var.

Parameters:
  • *exprs: Scalar

    column(s) to add, specified as positional arguments. Accepts expression input. Strings are parsed as column names, other non-expression inputs are parsed as literals.

  • **named_exprs: Scalar

    additional columns to add, specified as keyword arguments. The columns will be renamed to the keyword used.

Returns:

A new SingleCell dataset with var=var.with_columns(*exprs, **named_exprs).

Return type:

SingleCell