Shah-Miloni commited on
Commit
9829548
·
verified ·
1 Parent(s): 89e6d3f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+
4
+ # Direct path to the uploaded file (ensure the file is in the same directory as app.py or specify the correct relative path)
5
+ file_path = "pop.csv" # Adjust this if the file is in a subfolder (e.g., "data/pop.csv")
6
+
7
+ # Read the CSV file into a DataFrame
8
+ df = pd.read_csv(file_path)
9
+
10
+ # Display the first 5 rows of the dataset
11
+ st.write("First 5 rows of the dataset:")
12
+ st.write(df.head())