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

The behaviour for series backends.

Summary

Callbacks

Functions

Default inspect implementation for backends.

Create a new Series.

Types

@type df() :: Explorer.DataFrame.t()
@type dtype() :: Explorer.Series.dtype()
@type lazy_s() :: Explorer.Series.lazy_t()
@type non_finite() :: Explorer.Series.non_finite()
@type option(type) :: type | nil
@type s() :: Explorer.Series.t()
@type t() :: struct()
@type valid_types() ::
  number()
  | boolean()
  | String.t()
  | Date.t()
  | Time.t()
  | NaiveDateTime.t()
  | Explorer.Duration.t()

Callbacks

@callback abs(s()) :: s()
@callback acos(s()) :: s()
@callback add(out_dtype :: dtype(), s(), s()) :: s()
@callback all_equal(s(), s()) :: boolean() | lazy_s()
@callback argmax(s()) :: number() | non_finite() | lazy_s() | nil
@callback argmin(s()) :: number() | non_finite() | lazy_s() | nil
Link to this callback

argsort(s, descending?, nils_last)

View Source
@callback argsort(s(), descending? :: boolean(), nils_last :: boolean()) :: s()
@callback asin(s()) :: s()
@callback at(s(), idx :: integer()) :: s()
@callback at_every(s(), integer()) :: s()
@callback atan(s()) :: s()
@callback binary_and(s(), s()) :: s()
@callback binary_in(s(), s()) :: s()
@callback binary_or(s(), s()) :: s()
@callback cast(s(), dtype()) :: s()
@callback categories(s()) :: s()
@callback categorise(s(), s()) :: s()
@callback ceil(s()) :: s()
@callback clip(s(), number(), number()) :: s()
@callback coalesce(s(), s()) :: s()
@callback concat([s()]) :: s()
@callback contains(s(), String.t()) :: s()
@callback correlation(s(), s(), ddof :: non_neg_integer()) ::
  float() | non_finite() | lazy_s() | nil
@callback cos(s()) :: s()
@callback count(s()) :: number() | lazy_s()
@callback covariance(s(), s()) :: float() | non_finite() | lazy_s() | nil
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_product(s, reverse?)

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

cumulative_sum(s, reverse?)

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

cut(s, list, arg3, arg4, arg5)

View Source
@callback cut(s(), [float()], [String.t()] | nil, String.t() | nil, String.t() | nil) ::
  df()
@callback day_of_week(s()) :: s()
@callback distinct(s()) :: s()
@callback divide(out_dtype :: dtype(), s(), s()) :: s()
@callback downcase(s()) :: s()
@callback dtype(s()) :: dtype()
@callback equal(s(), s()) :: s()
Link to this callback

ewm_mean(s, alpha, adjust, min_periods, ignore_nils)

View Source
@callback ewm_mean(
  s(),
  alpha :: float(),
  adjust :: boolean(),
  min_periods :: integer(),
  ignore_nils :: boolean()
) :: s()
@callback exp(s()) :: s()
Link to this callback

fill_missing_with_strategy(s, arg2)

View Source
@callback fill_missing_with_strategy(s(), :backward | :forward | :min | :max | :mean) ::
  s()
Link to this callback

fill_missing_with_value(s, arg2)

View Source
@callback fill_missing_with_value(s(), :nan | valid_types()) :: s()
@callback first(s()) :: valid_types() | lazy_s()
@callback floor(s()) :: s()
@callback format([s()]) :: s()
@callback frequencies(s()) :: df()
Link to this callback

from_binary(binary, dtype)

View Source
@callback from_binary(binary(), dtype()) :: s()
@callback from_list(list(), dtype()) :: s()
@callback greater(s(), s()) :: s()
@callback greater_equal(s(), s()) :: s()
@callback head(s(), n :: integer()) :: s()
@callback hour(s()) :: s()
@callback inspect(s(), opts :: Inspect.Opts.t()) :: Inspect.Algebra.t()
@callback iotype(s()) :: :uft8 | :binary | {:s | :u | :f, non_neg_integer()}
@callback is_finite(s()) :: s()
@callback is_infinite(s()) :: s()
@callback is_nan(s()) :: s()
@callback is_nil(s()) :: s()
@callback is_not_nil(s()) :: s()
@callback last(s()) :: valid_types() | lazy_s()
@callback less(s(), s()) :: s()
@callback less_equal(s(), s()) :: s()
@callback log(argument :: s()) :: s()
@callback log(argument :: s(), base :: float()) :: s()
@callback lstrip(s(), String.t() | nil) :: s()
@callback mask(s(), mask :: s()) :: s()
@callback max(s()) ::
  number() | non_finite() | Date.t() | NaiveDateTime.t() | lazy_s() | nil
@callback mean(s()) :: float() | non_finite() | lazy_s() | nil
@callback median(s()) :: float() | non_finite() | lazy_s() | nil
@callback min(s()) ::
  number() | non_finite() | Date.t() | NaiveDateTime.t() | lazy_s() | nil
@callback minute(s()) :: s()
@callback month(s()) :: s()
Link to this callback

multiply(out_dtype, s, s)

View Source
@callback multiply(out_dtype :: dtype(), s(), s()) :: s()
@callback n_distinct(s()) :: integer() | lazy_s()
@callback nil_count(s()) :: number() | lazy_s()
@callback not_equal(s(), s()) :: s()
@callback peaks(s(), :max | :min) :: s()
@callback pow(s(), s()) :: s()
@callback product(s()) :: float() | non_finite() | lazy_s() | nil
Link to this callback

qcut(s, list, arg3, arg4, arg5)

View Source
@callback qcut(s(), [float()], [String.t()] | nil, String.t() | nil, String.t() | nil) ::
  df()
@callback quantile(s(), float()) ::
  number() | non_finite() | Date.t() | NaiveDateTime.t() | lazy_s() | nil
@callback quotient(s(), s()) :: s()
Link to this callback

rank(s, method, descending, seed)

View Source
@callback rank(
  s(),
  method :: String.t(),
  descending :: boolean(),
  seed :: option(integer())
) :: s() | lazy_s()
@callback remainder(s(), s()) :: s()
@callback replace(s(), String.t(), String.t()) :: s()
@callback reverse(s()) :: s()
@callback round(s(), decimals :: non_neg_integer()) :: s()
@callback rstrip(s(), String.t() | nil) :: s()
Link to this callback

sample(s, n_or_frac, replacement, shuffle, seed)

View Source
@callback sample(
  s(),
  n_or_frac :: number(),
  replacement :: boolean(),
  shuffle :: boolean(),
  seed :: option(integer())
) :: s()
@callback second(s()) :: s()
@callback select(predicate :: s(), s(), s()) :: s()
Link to this callback

shift(s, offset, default)

View Source
@callback shift(s(), offset :: integer(), default :: nil) :: s()
@callback sin(s()) :: s()
@callback size(s()) :: non_neg_integer() | lazy_s()
@callback skew(s(), bias? :: boolean()) :: float() | non_finite() | lazy_s() | nil
@callback slice(s(), indices :: list() | s()) :: s()
Link to this callback

slice(s, offset, length)

View Source
@callback slice(s(), offset :: integer(), length :: integer()) :: s()
Link to this callback

sort(s, descending?, nils_last)

View Source
@callback sort(s(), descending? :: boolean(), nils_last :: boolean()) :: s()
@callback standard_deviation(s()) :: float() | non_finite() | lazy_s() | nil
@callback strftime(s(), String.t()) :: s()
@callback strip(s(), String.t() | nil) :: s()
@callback strptime(s(), String.t()) :: s()
Link to this callback

substring(s, integer, arg3)

View Source
@callback substring(s(), integer(), non_neg_integer() | nil) :: s()
Link to this callback

subtract(out_dtype, s, s)

View Source
@callback subtract(out_dtype :: dtype(), s(), s()) :: s()
@callback sum(s()) :: number() | non_finite() | lazy_s() | nil
@callback tail(s(), n :: integer()) :: s()
@callback tan(s()) :: s()
@callback to_iovec(s()) :: [binary()]
@callback to_list(s()) :: list()
@callback transform(s(), (... -> any())) :: s()
@callback unary_not(s()) :: s()
@callback unordered_distinct(s()) :: s()
@callback upcase(s()) :: s()
@callback variance(s()) :: float() | non_finite() | lazy_s() | nil
Link to this callback

window_max(s, window_size, weights, min_periods, center)

View Source
@callback window_max(
  s(),
  window_size :: integer(),
  weights :: [float()] | nil,
  min_periods :: integer() | nil,
  center :: boolean()
) :: s()
Link to this callback

window_mean(s, window_size, weights, min_periods, center)

View Source
@callback window_mean(
  s(),
  window_size :: integer(),
  weights :: [float()] | nil,
  min_periods :: integer() | nil,
  center :: boolean()
) :: s()
Link to this callback

window_median(s, window_size, weights, min_periods, center)

View Source
@callback window_median(
  s(),
  window_size :: integer(),
  weights :: [float()] | nil,
  min_periods :: integer() | nil,
  center :: boolean()
) :: s()
Link to this callback

window_min(s, window_size, weights, min_periods, center)

View Source
@callback window_min(
  s(),
  window_size :: integer(),
  weights :: [float()] | nil,
  min_periods :: integer() | nil,
  center :: boolean()
) :: s()
Link to this callback

window_standard_deviation(s, window_size, weights, min_periods, center)

View Source
@callback window_standard_deviation(
  s(),
  window_size :: integer(),
  weights :: [float()] | nil,
  min_periods :: integer() | nil,
  center :: boolean()
) :: s()
Link to this callback

window_sum(s, window_size, weights, min_periods, center)

View Source
@callback window_sum(
  s(),
  window_size :: integer(),
  weights :: [float()] | nil,
  min_periods :: integer() | nil,
  center :: boolean()
) :: s()
@callback year(s()) :: s()

Functions

Link to this function

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

View Source

Default inspect implementation for backends.

Create a new Series.