with_columns_obs#
- SingleCell.with_columns_obs(*exprs, **named_exprs)[source]#
Equivalent to
df.with_columns()from polars, but applied to obs.- 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 obs=obs.with_columns(*exprs, **named_exprs).
- Return type: