torcharrow.DataFrame.transform¶
- DataFrame.transform(func: Callable, dtype: Optional[DType] = None, format: str = 'column', columns: Optional[List[str]] = None)¶
Like map() but invokes the callable on mini-batches of rows at a time. The column is passed to the callable as TorchArrow column by default. If format=’python’ the input is converted to python types instead. If format=’torch’ the input is converted to PyTorch types dtype required if result type != item type and the type hint is missing on the callable.