Spaces:
Runtime error
Runtime error
fix: field_value - mean
Browse files
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[
|
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:
|