daft.Expression.list.slice#
- Expression.list.slice(start: int | daft.expressions.expressions.Expression, end: Optional[Union[int, Expression]] = None) Expression [source]#
Gets a subset of each list
- Parameters:
start – index or column of indices. The slice will include elements starting from this index. If
start
is negative, it represents an offset from the end of the listend – optional index or column of indices. The slice will not include elements from this index onwards. If
end
is negative, it represents an offset from the end of the list. If not provided, the slice will include elements up to the end of the list
- Returns:
an expression with a list of the type of the list values
- Return type:
Expression