You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.1 KiB
48 lines
1.1 KiB
import pandas as pd
|
|
import streamlit as st
|
|
|
|
st.set_page_config(
|
|
page_title="Project Miner",
|
|
layout="wide"
|
|
)
|
|
|
|
st.title("Home")
|
|
|
|
### Exploration
|
|
uploaded_file = st.file_uploader("Upload your CSV file", type=["csv"])
|
|
|
|
if uploaded_file is not None:
|
|
st.session_state.data = pd.read_csv(uploaded_file)
|
|
st.success("File loaded successfully!")
|
|
|
|
|
|
if "data" in st.session_state:
|
|
data = st.session_state.data
|
|
st.write(data.head(10))
|
|
st.write(data.tail(10))
|
|
|
|
st.header("Data Preview")
|
|
|
|
st.subheader("First 5 Rows")
|
|
st.write(data.head())
|
|
|
|
st.subheader("Last 5 Rows")
|
|
st.write(data.tail())
|
|
|
|
st.header("Data Summary")
|
|
|
|
st.subheader("Basic Information")
|
|
col1, col2 = st.columns(2)
|
|
col1.metric("Number of Rows", data.shape[0])
|
|
col2.metric("Number of Columns", data.shape[1])
|
|
|
|
st.write(f"Column Names: {list(data.columns)}")
|
|
|
|
st.subheader("Missing Values by Column")
|
|
missing_values = data.isnull().sum()
|
|
st.write(missing_values)
|
|
|
|
st.subheader("Statistical Summary")
|
|
st.write(data.describe())
|
|
|