View Source Explorer.Backend.Series behaviour (Explorer v0.2.0)

The behaviour for series backends.

Link to this section Summary

Functions

Default inspect implementation for backends.

Link to this section Types

@type df() :: Explorer.DataFrame.t()
@type dtype() :: :integer | :float | :boolean | :string | :date | :datetime
@type s() :: Explorer.Series.t()
@type t() :: struct()
@type window_option() ::
  {:weights, [float()] | nil}
  | {:min_periods, integer() | nil}
  | {:center, boolean()}

Link to this section Callbacks

@callback add(s(), s() | number()) :: s()
@callback all_equal?(s(), s()) :: boolean()
@callback argsort(s(), reverse? :: boolean()) :: s()
@callback binary_and(s(), s()) :: s()
@callback binary_or(s(), s()) :: s()
@callback cast(s(), dtype()) :: s()
@callback coalesce(s(), s()) :: s()
@callback concat(s(), s()) :: s()
@callback count(s()) :: df()
Link to this callback

cumulative_max(s, reverse?)

View Source
@callback cumulative_max(s(), reverse? :: boolean()) :: s()
Link to this callback

cumulative_min(s, reverse?)

View Source
@callback cumulative_min(s(), reverse? :: boolean()) :: s()
Link to this callback

cumulative_sum(s, reverse?)

View Source
@callback cumulative_sum(s(), reverse? :: boolean()) :: s()
@callback distinct(s()) :: s()
@callback divide(s(), s() | number()) :: s()
@callback dtype(s()) :: dtype()
@callback eq(s(), s() | number()) :: s()
Link to this callback

fill_missing(s, strategy)

View Source
@callback fill_missing(s(), strategy :: :backward | :forward | :min | :max | :mean) :: s()
@callback filter(s(), mask :: s()) :: s()
@callback filter(s(), function()) :: s()
@callback from_list(list(), dtype()) :: s()
@callback get(s(), idx :: integer()) :: s()
@callback gt(s(), s() | number()) :: s()
@callback gt_eq(s(), s() | number()) :: s()
@callback head(s(), n :: integer()) :: s()
@callback inspect(s(), opts :: Inspect.Opts.t()) :: Inspect.Algebra.t()
@callback lt(s(), s() | number()) :: s()
@callback lt_eq(s(), s() | number()) :: s()
@callback max(s()) :: number() | Date.t() | NaiveDateTime.t()
@callback mean(s()) :: float()
@callback median(s()) :: float()
@callback min(s()) :: number() | Date.t() | NaiveDateTime.t()
@callback multiply(s(), s() | number()) :: s()
@callback n_distinct(s()) :: integer()
@callback neq(s(), s() | number()) :: s()
@callback nil?(s()) :: s()
@callback not_nil?(s()) :: s()
@callback peaks(s(), :max | :min) :: s()
@callback pow(s(), number()) :: s()
@callback quantile(s(), float()) :: number() | Date.t() | NaiveDateTime.t()
@callback reverse(s()) :: s()
Link to this callback

sample(s, n, replacement, seed)

View Source
@callback sample(s(), n :: integer(), replacement :: boolean(), seed :: integer()) :: s()
@callback size(s()) :: integer()
Link to this callback

slice(s, offset, length)

View Source
@callback slice(s(), offset :: integer(), length :: integer()) :: s()
@callback sort(s(), reverse? :: boolean()) :: s()
@callback std(s()) :: float()
@callback subtract(s(), s() | number()) :: s()
@callback sum(s()) :: number()
@callback tail(s(), n :: integer()) :: s()
@callback take(s(), indices :: list()) :: s()
@callback take_every(s(), integer()) :: s()
@callback to_enum(s()) :: Enumerable.t()
@callback to_list(s()) :: list()
@callback transform(s(), (... -> any())) :: s() | list()
@callback unordered_distinct(s()) :: s()
@callback var(s()) :: float()
Link to this callback

window_max(s, window_size, list)

View Source
@callback window_max(s(), window_size :: integer(), [window_option()]) :: s()
Link to this callback

window_mean(s, window_size, list)

View Source
@callback window_mean(s(), window_size :: integer(), [window_option()]) :: s()
Link to this callback

window_min(s, window_size, list)

View Source
@callback window_min(s(), window_size :: integer(), [window_option()]) :: s()
Link to this callback

window_sum(s, window_size, list)

View Source
@callback window_sum(s(), window_size :: integer(), [window_option()]) :: s()

Link to this section Functions

Link to this function

inspect(series, backend, n_rows, inspect_opts, opts \\ [])

View Source

Default inspect implementation for backends.