Skip to content

Diff

Base classes

Name Children Inherits
SeriesOp
datacook.engine.ops.series
A `ColumnOp` that is one call per column, declared like `CallOp`.

⋔ Inheritance diagram

graph TD
  3239454616["timeseries.Diff"]
  2451904138["series.SeriesOp"]
  124287307["series.ColumnOp"]
  1539482213["base.Op"]
  2751680898["builtins.object"]
  2451904138 --> 3239454616
  124287307 --> 2451904138
  1539482213 --> 124287307
  2751680898 --> 1539482213

🛈 DocStrings

Bases: SeriesOp

Source code in src/datacook/engine/ops/timeseries.py
class Diff(series.SeriesOp):
    id = "diff"
    title = _("Difference")
    description = _("Difference to the value n rows before.")
    category = categories.TIMESERIES
    icon = "mdi.delta"
    method = "diff"

    class Params(series.ColumnParams):
        periods: int = Field(1, title=N_("Rows"))

:fa-brands-github: Show source on GitHub