mesa_frames.AgentSet.__add__#

AgentSet.__add__(other: DataFrame | Mapping[str, Sequence[object] | Mapping[str, Sequence[object]] | Series | Any] | Sequence[Any] | ndarray | Table | DataFrame) Self#

Add agents to a new AbstractAgentSet through the + operator.

Other can be: - A DataFrame: adds the agents from the DataFrame. - A DataFrameInput: passes the input to the DataFrame constructor.

Parameters:

other (DataFrame | DataFrameInput) – The agents to add.

Returns:

A new AbstractAgentSet with the added agents.

Return type:

Self