mesa_frames.AgentSet.contains#

AgentSet.contains(agents: int) bool[source]#
AgentSet.contains(agents: int | Collection[int] | Series | DataFrame) Series

Check if agents with the specified IDs are in the AgentSet.

Parameters:

agents (IdsLike) – The ID(s) to check for.

Returns:

True if the agent is in the AgentSet, False otherwise.

Return type:

bool | BoolSeries