Spaces:
No application file
No application file
| 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)) |