You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, while launching the boston house regression app (app 9) I get this error:
KeyError: <class 'numpy.float64'>
Traceback:
File "/home/xxx/anaconda3/envs/stl/lib/python3.8/site-packages/streamlit/script_runner.py", line 332, in _run_script
exec(code, module.dict)
File "/home/xxx/github/streamlit_freecodecamp/app_9_regression_boston_housing/boston-house-ml-app.py", line 54, in
df = user_input_features()
File "/home/xxx/github/streamlit_freecodecamp/app_9_regression_boston_housing/boston-house-ml-app.py", line 25, in user_input_features
CRIM = st.sidebar.slider('CRIM', X.CRIM.min(), X.CRIM.max(), X.CRIM.mean())
File "/home/xxx/anaconda3/envs/stl/lib/python3.8/site-packages/streamlit/elements/slider.py", line 159, in slider
data_type = SUPPORTED_TYPES[type(value[0])]
It seems there something odd between the format in which data in the sidebar are saved and the way the program expects them?
Any help is appreciated!
Thanks
The text was updated successfully, but these errors were encountered:
Hey there, I'm not an expert myself but the problem is that streamlit complains about the min() and max() returning int64 instead of int. I found it here: streamlit/streamlit#1065 (comment)
If you adjust all the sliders like this, it works for me: CRIM = st.sidebar.slider('CRIM', float(X.CRIM.min()), float(X.CRIM.max()), float(X.CRIM.mean()))
Hey there, I'm not an expert myself but the problem is that streamlit complains about the min() and max() returning int64 instead of int. I found it here: streamlit/streamlit#1065 (comment)
If you adjust all the sliders like this, it works for me: CRIM = st.sidebar.slider('CRIM', float(X.CRIM.min()), float(X.CRIM.max()), float(X.CRIM.mean()))
Hello, while launching the boston house regression app (app 9) I get this error:
It seems there something odd between the format in which data in the sidebar are saved and the way the program expects them?
Any help is appreciated!
Thanks
The text was updated successfully, but these errors were encountered: