Skip to content

Strftime

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
  1708260628["dates.Strftime"]
  2451904138["series.SeriesOp"]
  124287307["series.ColumnOp"]
  1539482213["base.Op"]
  2751680898["builtins.object"]
  2451904138 --> 1708260628
  124287307 --> 2451904138
  1539482213 --> 124287307
  2751680898 --> 1539482213

🛈 DocStrings

Bases: SeriesOp

Source code in src/datacook/engine/ops/dates.py
class Strftime(series.SeriesOp):
    id = "dt_strftime"
    title = _("Date / time to text")
    description = _("Format date / time values as text (strftime format).")
    category = categories.DATETIME
    icon = "mdi.calendar-text"
    accessor = "dt"
    method = "strftime"
    positional = ("date_format",)

    class Params(series.ColumnParams):
        date_format: str = Field(
            "%Y-%m-%d", title=N_("Format"), min_length=1, examples=["%d.%m.%Y %H:%M"]
        )

:fa-brands-github: Show source on GitHub