import pandas as pd import numpy as np import streamlit as st import os st.set_page_config(page_title="Data analysis Portal", layout="wide") st.title("Data analysis portal") st.write("This will completely clean your data set") uploaded_file = st.file_uploader("Upload File (CSV or Excel):", type=["csv","xlsx"], accept_multiple_files=True) if uploaded_file: for file in uploaded_file: file_ext = os.path.splitext(file.name)[-1].lower() if file_ext==".csv": df = pd.read_csv(file) if file_ext==".xlsx": df = pd.read_excel(file) else: print(f"The file you have entered is = {file} is not in the accepted format") continue # display info of the file st.write(f"**File Name:**{file.name}") st.write(f"**File size:**{file.size/1024}") # Show our data set st.write("This will preview the dataset head") st.dataframe(df.head())