laverdes commited on
Commit
5502743
1 Parent(s): f5dcaef

fix: field_value - mean

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -83,7 +83,7 @@ with col2:
83
  add_relative = st.button(f"Add {relative_key}")
84
  if add_relative:
85
  baseline_mean = [sum(s)/len(s) for s in df_right['baseline']]
86
- df_right['relative_pupil_dilation'] = [df_right[option[0]][i] - baseline_mean[i] for i in range(len(df_right))]
87
  st.markdown("After adding calculated fields")
88
  st.dataframe(df_right)
89
  with open('myfile.csv') as f:
 
83
  add_relative = st.button(f"Add {relative_key}")
84
  if add_relative:
85
  baseline_mean = [sum(s)/len(s) for s in df_right['baseline']]
86
+ df_right[relative_key] = [[field_value - baseline_mean[i] for field_value in df_right[option[0]][i]] for i in range(len(df_right))]
87
  st.markdown("After adding calculated fields")
88
  st.dataframe(df_right)
89
  with open('myfile.csv') as f: