projectmesa/mesa-frames

Rename 'agents' property to 'df' for AgentContainer

Opened this issue · 0 comments

Current Behavior

To access the underlying dataframe of AgentSetDF or AgentsDF, we currently use:

AgentContainer.agents

This can lead to unclear syntax, especially when accessing it from the model:

model.agents.agents

Proposed Change

Rename the agents property to df for improved clarity.

Expected Behavior

After the change, accessing the dataframe would look like:

AgentContainer.df

And from the model:

model.agents.df

Benefits

  • Clearer API
  • Reduces confusion when dealing with nested 'agents' references
  • More intuitive naming convention (df clearly indicates a DataFrame)