Circhastic commited on
Commit
18b17ea
1 Parent(s): af7be88

First version hotfix #2

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -250,17 +250,17 @@ with st.sidebar:
250
  if uploaded_file is not None:
251
  date_found = False
252
  sales_found = False
253
- for column in uploaded_file.columns:
 
254
  if 'Date' in column:
255
  date_found = True
256
  if 'Sales' in column:
257
  sales_found = True
258
- if(date_found == False and sales_found == False):
259
  st.error('Please upload a csv containing both Date and Sales...')
260
  st.stop()
261
 
262
  st.success("File uploaded successfully!")
263
- df = pd.read_csv(uploaded_file, parse_dates=True)
264
  st.write("Your uploaded data:")
265
  st.write(df)
266
 
 
250
  if uploaded_file is not None:
251
  date_found = False
252
  sales_found = False
253
+ df = pd.read_csv(uploaded_file, parse_dates=True)
254
+ for column in df.columns:
255
  if 'Date' in column:
256
  date_found = True
257
  if 'Sales' in column:
258
  sales_found = True
259
+ if(date_found == False or sales_found == False):
260
  st.error('Please upload a csv containing both Date and Sales...')
261
  st.stop()
262
 
263
  st.success("File uploaded successfully!")
 
264
  st.write("Your uploaded data:")
265
  st.write(df)
266