pipe#

SingleCell.pipe(function, /, *args, **kwargs)[source]#

Apply a function to a SingleCell dataset.

sc.pipe(func) is equivalent to func(sc). sc.pipe(func, 1, a=2) is equivalent to func(sc, 1, a=2).

Parameters:
  • function: Callable[[SingleCell, ...], Any]

    the function to apply to the SingleCell dataset. It must take a SingleCell dataset as its first argument, and can return any value. The function may also allow other arguments after the count matrix, which can be specified via args and kwargs.

  • *args: Any

    the positional arguments to the function

  • **kwargs: Any

    the keyword arguments to the function

Returns:

The result of applying the function to this SingleCell dataset.

Return type:

Any