Skip to content

ResetIndex

Base classes

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

⋔ Inheritance diagram

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

🛈 DocStrings

Bases: CallOp

Source code in src/datacook/engine/ops/rows.py
class ResetIndex(base.CallOp):
    id = "reset_index"
    title = _("Reset index")
    description = _("Number the rows 0, 1, 2, ...; the old index becomes columns or is dropped.")
    category = categories.ROWS
    icon = "mdi.format-list-numbered"
    method = "reset_index"

    class Params(base.Params):
        drop: bool = Field(False, title=N_("Drop the old index"))

:fa-brands-github: Show source on GitHub