Skip to content

FilterRows

Base classes

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

⋔ Inheritance diagram

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

🛈 DocStrings

Bases: CallOp

Source code in src/datacook/engine/ops/rows.py
class FilterRows(base.CallOp):
    id = "filter_rows"
    title = _("Filter rows")
    description = _("Keep the rows for which an expression is true (pandas query syntax).")
    category = categories.FILTER
    icon = "mdi.filter-outline"
    method = "query"
    positional = ("expr",)

    class Params(base.Params):
        expr: str = Field(title=N_("Expression"), min_length=1, examples=["a > 0 and b == 'x'"])

:fa-brands-github: Show source on GitHub