arnaudmiribel / streamlit-extras

Discover, try, install and share Streamlit re-usable bits we call "extras"!
https://extras.streamlit.app
Apache License 2.0
715 stars 123 forks source link

🐛 [BUG] - <title>dataframe_explorer bad filter #154

Open Devvver opened 1 year ago

Devvver commented 1 year ago

Description

When using dataframe_explorer when filtering text fields, an error is displayed if values with None are caught. In theory, I solved it using the code df["address"].fillna("no data", inplace=True) But if you select a numeric value (column) with a large number of None as the 2nd element of filtering, an error is displayed

StreamlitAPIException: Every Multiselect default value must exist in options

Traceback: File "D:\Python\pythonstreamlit\main.py", line 49, in filtered_df = dataframe_explorer(dataframe, case=False) File "D:\Python\pythonstreamlit\Envs\lib\site-packages\streamlit_extras\dataframe_explorer__init__.py", line 55, in dataframe_explorer filters[column] = right.multiselect(

Reproduction steps

Code for error (and csv)
https://github.com/Devvver/demoerror

Screenshots

Video problem
https://youtu.be/1eAIObZYupU

Logs

No response

Version of streamlit

last

Version of streamlit-extras

last