Closed rht closed 4 months ago
@adamamer20 https://github.com/adamamer20/mesa-frames/blob/bf1ccd9328f260a746c21a6bad7e15a7a6898dc3/docs/scripts/readme_plot.py#L132-L136 doesn't seem to work. I got this error
File "/github/projectmesa/mesa-frames/docs/scripts/readme_plot.py", line 163, in give_money
.then(pl.col("wealth") + new_wealth["wealth"])
~~~~~~~~~~^^^^^^^^^^
File "/code/venv/lib/python3.11/site-packages/polars/dataframe/frame.py", line 1183, in __getitem__
return get_df_item_by_key(self, key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/venv/lib/python3.11/site-packages/polars/_utils/getitem.py", line 160, in get_df_item_by_key
return df.get_column(key)
^^^^^^^^^^^^^^^^^^
File "/code/venv/lib/python3.11/site-packages/polars/dataframe/frame.py", line 7557, in get_column
return wrap_s(self._df.get_column(name))
^^^^^^^^^^^^^^^^^^^^^^^^^
polars.exceptions.ColumnNotFoundError: wealth
This is a good idea, we can also check the performance overhead of mesa-frames. I corrected the bug in main, i will make the necessary changes in #23.
Closed via #23 and #24.
For both pandas and Polars, there are at least 3 ways to do things for each steps. But they can be roughly split into 2: using native expression and using a simpler, more concise API. We should split further into 4 agents:
and benchmark them. Because: