Complex filtering in dask DataFrame Complex filtering in dask DataFrame numpy numpy

Complex filtering in dask DataFrame


If you replace np.sqrt with da.sqrt then everything works fine.

import dask.array as da

You may notice that np.sqrt of a dask series produces a numpy array, so this step in your computation is not lazy, but forces a concrete result. Use the dask equivalent function to maintain laziness and to keep everything dask-compliant.