Skip to content

Commit 784f06b

Browse files
committed
minor tweak of sidebar
1 parent b6a6a69 commit 784f06b

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

code/pages/1_Basic behavior analysis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from sklearn.preprocessing import StandardScaler
1111
from streamlit_plotly_events import plotly_events
1212
from util.aws_s3 import load_data
13-
from util.streamlit import add_session_filter, data_selector
13+
from util.streamlit import add_session_filter, data_selector, add_footnote
1414
from scipy.stats import gaussian_kde
1515
import streamlit_nested_layout
1616

@@ -126,6 +126,7 @@ def app():
126126
with st.sidebar:
127127
add_session_filter(if_bonsai=True)
128128
data_selector()
129+
add_footnote()
129130

130131
if not hasattr(ss, "df"):
131132
st.write("##### Data not loaded yet, start from Home:")

code/util/streamlit.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -691,13 +691,14 @@ def add_dot_property_mapper():
691691

692692
def data_selector():
693693

694-
with st.expander(f'Session selector', expanded=True):
695-
# --- add a download button ---
696-
_add_download_filtered_session()
697-
694+
with st.expander(f'Session selector', expanded=True):
698695
with st.expander(f"Filtered: {len(st.session_state.df_session_filtered)} sessions, "
699696
f"{len(st.session_state.df_session_filtered.h2o.unique())} mice", expanded=False):
700697
st.dataframe(st.session_state.df_session_filtered)
698+
699+
# --- add a download button ---
700+
with st.columns([1, 10])[1]:
701+
_add_download_filtered_session()
701702

702703
# cols = st.columns([4, 1])
703704
# with cols[0].expander(f"From dataframe: {len(st.session_state.df_selected_from_dataframe)} sessions", expanded=False):

0 commit comments

Comments
 (0)