PablocFonseca / streamlit-aggrid

Implementation of Ag-Grid component for Streamlit
https://pypi.org/project/streamlit-aggrid/
MIT License
1.06k stars 202 forks source link

Pandas FutureWarning #59

Closed RensDimmendaal closed 2 years ago

RensDimmendaal commented 2 years ago

Hey 👋 Thanks for the great package!

I'm encountering the following warning:

/Users/.../.venv/lib/python3.9/site-packages/st_aggrid/__init__.py:253: FutureWarning: Passing a dict as an indexer is deprecated and will raise in a future version. Use a list instead.
  frame.loc[:,text_columns]  = frame.loc[:,text_columns].astype(str)

I'm using the following versions:

I believe the solution would be to use text_columns.keys() instead of text_columns. And to make similar changes for the other column types in st_aggrid/__init__.py

Happy to submit a PR with these changes if you like.

PablocFonseca commented 2 years ago

Thanks! Yes, please send the PR! I'll include in next version!