mesa_frames.AgentSet.discard#

AgentSet.discard(agents: int | Collection[int] | Series | DataFrame | Sequence[int] | Literal['all', 'active'] | None | Expr, inplace: bool = True) Self#

Remove an agent from the AbstractAgentSet. Does not raise an error if the agent is not found.

Parameters:
  • agents (IdsLike | AgentMask) – The ids to remove

  • inplace (bool, optional) – Whether to remove the agent in place, by default True

Returns:

The updated AbstractAgentSet.

Return type:

Self