# `Explorer.Backend`
[🔗](https://github.com/elixir-nx/explorer/blob/v0.12.0/lib/explorer/backend.ex#L1)

The behaviour for Explorer backends and associated functions.

Each backend is a module with `DataFrame` and `Series` submodules that match the 
respective behaviours for each.

The default backend is read from the application environment. Currently, the only 
backend is an in-memory, eager one based on
[`Polars`](https://github.com/pola-rs/polars). When alternatives are
available, you can use them by configuring your runtime:

    # config/runtime.exs
    import Config
    config :explorer, default_backend: Lib.CustomBackend

# `get`

Gets the default backend for the current process.

# `put`

Sets the current process default backend to `backend`.

The default backend is stored only in the process dictionary. This means if
you start a separate process, such as `Task`, the default backend must be set
on the new process too.

## Examples
    iex> Explorer.Backend.put(Lib.CustomBackend)
    Explorer.PolarsBackend
    iex> Explorer.Backend.get()
    Lib.CustomBackend

---

*Consult [api-reference.md](api-reference.md) for complete listing*
