lace.Engine.remove_rows
- Engine.remove_rows(indices: Series | List[str] | Set[str]) DataFrame
Remove rows from the table.
- Parameters:
indices (Union[pd.Series, List[str], pd.Series, Set[str]]) – Rows to remove from the Engine, specified by index or id name.
Example
Remove crab and squid from the animals example engine.
>>> from lace.examples import Animals >>> engine = Animals() >>> n_rows = engine.n_rows >>> removed = engine.remove_rows(["cow", "wolf"]) >>> n_rows == engine.n_rows + 1 True >>> removed["index"] ┌────────┐ │ index │ │ --- │ │ str │ ╞════════╡ │ cow │ │ wolf │ └────────┘