Spaces:
Runtime error
Runtime error
fix: axes order in code
Browse files- pages/1_📈_Plotting.py +3 -3
pages/1_📈_Plotting.py
CHANGED
@@ -44,10 +44,8 @@ if not df_base.empty:
|
|
44 |
df_plot = df_base.head(n_plot)
|
45 |
st.caption(f"Selected number of samples: {n_plot}")
|
46 |
df_plot = [ini_list.strip('][').split(',') for ini_list in df_plot[feature]]
|
47 |
-
st.caption(f"Size of df_plot: {df_plot.axes}")
|
48 |
-
st.caption("The visualized data:")
|
49 |
df_plot = pd.DataFrame(df_plot)
|
50 |
-
|
51 |
if 'df_plot' not in st.session_state:
|
52 |
st.session_state['df_plot'] = df_plot
|
53 |
with st.expander("See explanation"):
|
@@ -57,8 +55,10 @@ if not df_base.empty:
|
|
57 |
if 'df_plot' in list(st.session_state.keys()):
|
58 |
with st.spinner(f"Drawing plot to visualize {plot.lower()}"):
|
59 |
st.caption("Your visualization:")
|
|
|
60 |
st.dataframe(st.session_state.df_plot)
|
61 |
st.line_chart(st.session_state.df_plot, y=[str(v) for v in list(df_plot.columns)])
|
|
|
62 |
st.dataframe(st.session_state.df_plot.transpose())
|
63 |
st.line_chart(st.session_state.df_plot.transpose(), y=[str(v) for v in list(df_plot.transpose().columns)])
|
64 |
elif df_base.empty and file:
|
|
|
44 |
df_plot = df_base.head(n_plot)
|
45 |
st.caption(f"Selected number of samples: {n_plot}")
|
46 |
df_plot = [ini_list.strip('][').split(',') for ini_list in df_plot[feature]]
|
|
|
|
|
47 |
df_plot = pd.DataFrame(df_plot)
|
48 |
+
st.caption(f"Axes of df_plot: {df_plot.axes}")
|
49 |
if 'df_plot' not in st.session_state:
|
50 |
st.session_state['df_plot'] = df_plot
|
51 |
with st.expander("See explanation"):
|
|
|
55 |
if 'df_plot' in list(st.session_state.keys()):
|
56 |
with st.spinner(f"Drawing plot to visualize {plot.lower()}"):
|
57 |
st.caption("Your visualization:")
|
58 |
+
st.caption("df_plot:")
|
59 |
st.dataframe(st.session_state.df_plot)
|
60 |
st.line_chart(st.session_state.df_plot, y=[str(v) for v in list(df_plot.columns)])
|
61 |
+
st.caption("df_plot transposed:")
|
62 |
st.dataframe(st.session_state.df_plot.transpose())
|
63 |
st.line_chart(st.session_state.df_plot.transpose(), y=[str(v) for v in list(df_plot.transpose().columns)])
|
64 |
elif df_base.empty and file:
|