holoviews.core.data.dask module#

class holoviews.core.data.dask.DaskInterface(*, name)[source]#

Bases: PandasInterface

The DaskInterface allows a Dataset objects to wrap a dask DataFrame object. Using dask allows loading data lazily and performing out-of-core operations on the data, making it possible to work on datasets larger than memory.

The DaskInterface covers almost the complete API exposed by the PandasInterface with two notable exceptions:

  1. Sorting is not supported and any attempt at sorting will be ignored with an warning.

  2. Dask does not easily support adding a new column to an existing dataframe unless it is a scalar, add_dimension will therefore error when supplied a non-scalar value.

  1. Not all functions can be easily applied to a dask dataframe so some functions applied with aggregate and reduce will not work.

Parameter Definitions


classmethod applies(obj)[source]#

Indicates whether the interface is designed specifically to handle the supplied object’s type. By default simply checks if the object is one of the types declared on the class, however if the type is expensive to import at load time the method may be overridden.

classmethod compute(dataset)[source]#

Should return a computed version of the Dataset.

classmethod iloc(dataset, index)[source]#

Dask does not support iloc, therefore iloc will execute the call graph and lose the laziness of the operation.

classmethod loaded()[source]#

Indicates whether the required dependencies are loaded.

classmethod persist(dataset)[source]#

Should return a persisted version of the Dataset.

classmethod select_mask(dataset, selection)[source]#

Given a Dataset object and a dictionary with dimension keys and selection keys (i.e. tuple ranges, slices, sets, lists. or literals) return a boolean mask over the rows in the Dataset object that have been selected.

classmethod unpack_scalar(dataset, data)[source]#

Given a dataset object and data in the appropriate format for the interface, return a simple scalar.