laverdes commited on
Commit
80c206d
·
1 Parent(s): 82b2121

test: columns

Browse files
Files changed (1) hide show
  1. pages/1_📈_Plotting.py +4 -2
pages/1_📈_Plotting.py CHANGED
@@ -45,6 +45,8 @@ if not df_base.empty:
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
@@ -57,9 +59,9 @@ if 'df_plot' in list(st.session_state.keys()):
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=[int(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=[int(v) for v in list(df_plot.transpose().columns)])
64
  elif df_base.empty and file:
65
  st.warning("Consider running outlier detection to clean your data!", icon="⚠️")
 
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
+ df_plot.columns = [str(column) for column in range(df_plot.columns)]
49
+ st.caption(f"Columns of df_plot: {list(df_plot.columns)}")
50
  st.caption(f"Axes of df_plot: {df_plot.axes}")
51
  if 'df_plot' not in st.session_state:
52
  st.session_state['df_plot'] = df_plot
 
59
  st.caption("Your visualization:")
60
  st.caption("df_plot:")
61
  st.dataframe(st.session_state.df_plot)
62
+ st.line_chart(st.session_state.df_plot, y=list(df_plot.columns))
63
  st.caption("df_plot transposed:")
64
  st.dataframe(st.session_state.df_plot.transpose())
65
+ st.line_chart(st.session_state.df_plot.transpose(), y=list(df_plot.transpose().columns))
66
  elif df_base.empty and file:
67
  st.warning("Consider running outlier detection to clean your data!", icon="⚠️")