Dask logo

Delayed

What if you don't have an array or dataframe? Instead of having blocks where the function is applied to each block, you can decorate functions with @delayed and have the functions themselves be lazy.

NOTE: For this example we will create a fake dataset and store it on disk. You can ignore this bit.

Delayed version of ETL

This is example matches the one in Not Delayed. But this one has Dask.

Delayed objects

Of course objects can also be converted to delayed. Here we can convert from a dask.array to a numpy.array of delayed objects.

Delayed objects can be used like blocks, but they don't have any sense of what they represent, so there are fewer guard rails.