File size: 448 Bytes
a4d2df9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import pandas as pd
import streamlit as st

st.set_page_config(page_title="Upload Data")

# Add a title to the app
st.title("Upload CSV File")

# Create a file uploader
uploaded_file = st.file_uploader("Choose a CSV file", type="csv")

df = pd.DataFrame()

# If a file was uploaded
if uploaded_file is not None:
    # Read the file and create a Pandas DataFrame
    df = pd.read_csv(uploaded_file)

    # Show the DataFrame
    st.write(df.head(4))