Started typing this and marking as DRAFT/WIP. Will come back to it.
I would like to return a filtered dataframe using pn.widgets.Select
.
In streamlit I can do something like
value = st.selectbox("values:", values)
filtered_df = df[df["COL"] == value]
I can continue to do stuff with filtered_df
e.g.
st.markdown(len(filtered_df))
fig, ax = plt.subplots()
df["COL"].plot.hist(ax=ax)
st.pyplot(fig)
I would like to do the same with panel. I currently have a function to do this using @pn.depends
value = pn.widgets.Select(name="values:", options=values).servable()
@pn.depends(value=value)
def filter_df(value):
return df[df["COL"] == value]
but iām not sure how to continue working with it