Skip to content

Length

Base classes

Name Children Inherits
TextOp
datacook.engine.ops.strings

⋔ Inheritance diagram

graph TD
  1565028772["strings.Length"]
  4127298390["strings.TextOp"]
  2451904138["series.SeriesOp"]
  124287307["series.ColumnOp"]
  1539482213["base.Op"]
  2751680898["builtins.object"]
  4127298390 --> 1565028772
  2451904138 --> 4127298390
  124287307 --> 2451904138
  1539482213 --> 124287307
  2751680898 --> 1539482213

🛈 DocStrings

Bases: TextOp

Source code in src/datacook/engine/ops/strings.py
class Length(TextOp):
    id = "str_len"
    title = _("Text length")
    description = _("Number of characters of each text.")
    icon = "mdi.counter"
    method = "len"

    class Params(series.ColumnParams):
        suffix: str = Field(
            "_len",
            title=N_("Suffix for new columns"),
            description=N_("Empty: replace the columns. Otherwise the results are new columns."),
        )

:fa-brands-github: Show source on GitHub