select_var#
- SingleCell.select_var(*exprs, **named_exprs)[source]#
Equivalent to
df.select()from polars, but applied to var. var_names will be automatically included as the first column, if not included explicitly.- Parameters:
*exprs: Scalar
column(s) to select, 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 select, specified as keyword arguments. The columns will be renamed to the keyword used.
- Returns:
A new SingleCell dataset with var=var.select(*exprs, **named_exprs), and var_names as the first column unless already included explicitly.
- Return type: