I'm developing a model in which I set some attributes of the agents and of the model as pandas Series (I opted for this type since I have to read many data and many operations took less lines of code for Series than for dictionaries).
However, when I got to the point of running the model launching the server to run the web visualization, I got the error that Series objects are not JSON serializable.
I'd have two question:
- Is it possible to run the visualization even if I have some attributes that are pandas Series, or there is no way and I have to change them for dictionaries?
- In case I need to change for dictionaries, do I have to change only classes attributes or I cannot use any pandas Series/DataFrame at all, not even as temporary variables inside methods?