Skip to content

Commit

Permalink
Change index at DataFrame creation in DataCollector.get_agent_vars_da…
Browse files Browse the repository at this point in the history
…taframe
  • Loading branch information
Tortar committed Jan 21, 2023
1 parent c7b2ccf commit dcbc90b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesa/datacollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ def get_agent_vars_dataframe(self):
df = pd.DataFrame.from_records(
data=all_records,
columns=["Step", "AgentID"] + rep_names,
index=["Step", "AgentID"],
)
df = df.set_index(["Step", "AgentID"])
return df

def get_table_dataframe(self, table_name):
Expand Down

0 comments on commit dcbc90b

Please sign in to comment.