dandelion.set_backend

dandelion.set_backend(mode)[source]

Override the active backend at runtime.

Parameters:

mode (str) – 'polars' to use the Polars-based backend, or 'base' / 'pandas' to use the pandas-based backend. If the requested mode is already active, this is a no-op.

Return type:

None

Examples

>>> import dandelion as ddl
>>> ddl.set_backend(mode="base")    # switch to pandas backend
>>> ddl.set_backend(mode="polars")  # switch to polars backend