Skip to content

Error for Boston House Regression - Data format #1

@paluigi

Description

@paluigi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions