How to save the attributes of all agents to csv file?

29 views
Skip to first unread message

Charmane Lam

unread,
Mar 4, 2019, 5:02:09 PM3/4/19
to GAMA
I would like to save a table of attributes of all my agents, just like the one the could be shown by clicking "Agents > Simulation > Population of agents".

I have tried the button "Save the agents and their attributes into a CSV file". But then I got all the attributes of each agent saved in a single column.

Then, I tried to write codes to save the attributes, according to this example: https://gama-platform.github.io/wiki/Save-statement-Save_to_CSV.html
But I could only record the attributes of the last agent.

Any suggestion?

Thanks in advance.

Srirama Bhamidipati

unread,
Mar 4, 2019, 5:18:17 PM3/4/19
to GAMA
Hi

For the save statement, use the rewrite aspect true/false to have all or only the last agent.

For save button, you must use a delimiter with the text to columns menu in Excel to get each attribute in a separate column.


Srirama

Srirama Bhamidipati

unread,
Mar 4, 2019, 5:28:05 PM3/4/19
to GAMA
I mean rewrite facet not aspect ....sorry.

Charmane Lam

unread,
Mar 5, 2019, 9:35:32 AM3/5/19
to GAMA
Hi,

Thank you very much. The problems have been solved!
Reply all
Reply to author
Forward
0 new messages