Spaces:
Runtime error
Runtime error
fix: continuity does not need string to list casting
Browse files- pages/1_📈_Plotting.py +8 -5
pages/1_📈_Plotting.py
CHANGED
@@ -55,7 +55,10 @@ with tab1:
|
|
55 |
st.snow()
|
56 |
feature = "relative_pupil_dilation"
|
57 |
df_plot = df_base.head(n_plot)
|
58 |
-
|
|
|
|
|
|
|
59 |
df_plot = pd.DataFrame(df_plot)
|
60 |
df_plot.columns = [str(column) for column in range(len(df_plot.columns))]
|
61 |
if 'df_plot' not in st.session_state:
|
@@ -68,15 +71,15 @@ with tab1:
|
|
68 |
df_plot_t = df_plot.copy(deep=True).transpose()
|
69 |
df_plot_t.columns = [str(column) for column in range(len(df_plot_t.columns))]
|
70 |
st.line_chart(df_plot_t, y=list(df_plot_t.columns), height=450, width=600)
|
71 |
-
st.dataframe(df_plot_t)
|
72 |
with st.expander("See explanation"):
|
73 |
st.caption("The chart above shows...")
|
74 |
elif df_base.empty and file:
|
75 |
st.warning("Consider running outlier detection to clean your data!", icon="⚠️")
|
76 |
|
77 |
-
st.caption(f"developer:: session_state keys: {list(st.session_state.keys())}")
|
78 |
-
st.caption(f"what is the meaning of the x-axis, add to explanation")
|
79 |
-
st.caption(f"add sample data demo in another tab")
|
80 |
|
81 |
# demo
|
82 |
with tab2:
|
|
|
55 |
st.snow()
|
56 |
feature = "relative_pupil_dilation"
|
57 |
df_plot = df_base.head(n_plot)
|
58 |
+
try:
|
59 |
+
df_plot = [ini_list.strip('][').split(',') for ini_list in df_plot[feature]]
|
60 |
+
except AttributeError:
|
61 |
+
df_plot = [ini_list for ini_list in df_plot[feature]]
|
62 |
df_plot = pd.DataFrame(df_plot)
|
63 |
df_plot.columns = [str(column) for column in range(len(df_plot.columns))]
|
64 |
if 'df_plot' not in st.session_state:
|
|
|
71 |
df_plot_t = df_plot.copy(deep=True).transpose()
|
72 |
df_plot_t.columns = [str(column) for column in range(len(df_plot_t.columns))]
|
73 |
st.line_chart(df_plot_t, y=list(df_plot_t.columns), height=450, width=600)
|
74 |
+
# st.dataframe(df_plot_t)
|
75 |
with st.expander("See explanation"):
|
76 |
st.caption("The chart above shows...")
|
77 |
elif df_base.empty and file:
|
78 |
st.warning("Consider running outlier detection to clean your data!", icon="⚠️")
|
79 |
|
80 |
+
# st.caption(f"developer:: session_state keys: {list(st.session_state.keys())}")
|
81 |
+
# st.caption(f"what is the meaning of the x-axis, add to explanation")
|
82 |
+
# st.caption(f"add sample data demo in another tab")
|
83 |
|
84 |
# demo
|
85 |
with tab2:
|