Mattral commited on
Commit
4112189
·
verified ·
1 Parent(s): 60772d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -162,23 +162,22 @@ def main():
162
  st.write()
163
 
164
  # Calculate correlation
165
- if warehouse_df[warehouse_column].dtype != "object" and industry_df[industry_column].dtype != "object":
166
- correlation = warehouse_df[warehouse_column].corr(industry_df[industry_column])
167
- st.header("Correlation")
168
- st.write(f"The correlation between {warehouse_column} in warehouse item stocks and {industry_column} in industry item stocks is: {correlation}")
169
- st.write()
170
 
171
 
172
- # Show correlation plot for each dataset
173
- if st.button("Correlation for each dataset"):
174
 
175
- st.subheader("Correlation Plot for Warehouse Dataset")
176
- warehouse_corr_plot = plot_correlation(warehouse_df, warehouse_column)
177
- st.pyplot(warehouse_corr_plot)
178
 
179
- st.subheader("Correlation Plot for Industry Dataset")
180
- industry_corr_plot = plot_correlation(industry_df, industry_column)
181
- st.pyplot(industry_corr_plot)
182
 
183
  if __name__ == "__main__":
184
  main()
 
162
  st.write()
163
 
164
  # Calculate correlation
165
+ correlation = warehouse_df[warehouse_column].corr(industry_df[industry_column])
166
+ st.header("Correlation")
167
+ st.write(f"The correlation between {warehouse_column} in warehouse item stocks and {industry_column} in industry item stocks is: {correlation}")
168
+ st.write()
 
169
 
170
 
171
+ # Show correlation plot for each dataset
172
+ if st.button("Correlation for each dataset"):
173
 
174
+ st.subheader("Correlation Plot for Warehouse Dataset")
175
+ warehouse_corr_plot = plot_correlation(warehouse_df, warehouse_column)
176
+ st.pyplot(warehouse_corr_plot)
177
 
178
+ st.subheader("Correlation Plot for Industry Dataset")
179
+ industry_corr_plot = plot_correlation(industry_df, industry_column)
180
+ st.pyplot(industry_corr_plot)
181
 
182
  if __name__ == "__main__":
183
  main()