Skip to content

Head

Sub classes

Name Children Inherits
Tail
datacook.engine.ops.rows

    Base classes

    Name Children Inherits
    CallOp
    datacook.engine.ops.base
    An op that is one pandas call.

    ⋔ Inheritance diagram

    graph TD
      1208100680["rows.Head"]
      3484306131["base.CallOp"]
      1539482213["base.Op"]
      2751680898["builtins.object"]
      3484306131 --> 1208100680
      1539482213 --> 3484306131
      2751680898 --> 1539482213

    🛈 DocStrings

    Bases: CallOp

    Source code in src/datacook/engine/ops/rows.py
    class Head(base.CallOp):
        id = "head"
        title = _("First rows")
        description = _("Keep the first n rows.")
        category = categories.ROWS
        icon = "mdi.format-vertical-align-top"
        method = "head"
        positional = ("n",)
    
        class Params(base.Params):
            n: int = Field(5, title=N_("Rows"))
    

    :fa-brands-github: Show source on GitHub