visualize_decoratorsdask_to_pandas

dask_to_pandas

visualize._decorators.dask_to_pandas(fun)

Decorator that converts function arguments from dask to pandas.

If a dask dataframe is enctounered in the methods, it is computed, converting it to a pandas dataframe.

Usecase: Allows to write methods for pandas for pandas only, and they can then stil be used for dask dataframes by outsourcing the logic of converting dask to pandas.

Parameters:

fun – The function to decorate.

Returns:

The same function, but whose arguments are now pandas instead of dask dataframes when called.