vonshed commited on
Commit
c492d6f
1 Parent(s): a334148

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -35,12 +35,15 @@ def read_csv_file(file):
35
 
36
 
37
 
38
- data = read_csv_file(st.sidebar.file_uploader("Upload a CSV file"))
39
 
40
- # Display the data if a file is uploaded
41
- if data:
42
- st.subheader("Data from uploaded CSV:")
43
- st.dataframe(data)
 
 
 
44
 
45
 
46
 
 
35
 
36
 
37
 
38
+ uploaded_file = st.sidebar.file_uploader("Choose a CSV file", type=["csv"])
39
 
40
+ # Check if a file was uploaded
41
+ if uploaded_file is not None:
42
+ # Read the CSV file
43
+ df = pd.read_csv(uploaded_file)
44
+
45
+ # Show the contents of the CSV file in the main area
46
+ st.write(df)
47
 
48
 
49