Spaces:
Sleeping
Sleeping
File size: 1,023 Bytes
f797554 d0b6f92 f797554 d0b6f92 28fb88e d0b6f92 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
import streamlit as st
import pandas as pd
# Set page title
st.title("Student Grades Analysis")
# File uploader for CSV
uploaded_file = st.file_uploader("Upload your student grades CSV file", type=["csv"])
if uploaded_file is not None:
# Read the CSV file
df = pd.read_csv(uploaded_file)
# Display the DataFrame
st.subheader("Uploaded DataFrame")
st.dataframe(df)
# Display descriptive statistics
st.subheader("Descriptive Statistics")
st.write("**Basic Statistics for Numeric Columns**")
st.dataframe(df.describe())
# Additional statistics
st.write("**Column Data Types**")
st.write(df.dtypes)
st.write("**Missing Values**")
st.write(df.isnull().sum())
st.write("**Gender Distribution**")
st.write(df['gender'].value_counts())
st.write("**Correlation between Physics and Math Grades**")
st.write(df[['physics_grade', 'math_grade']].corr())
else:
st.info("Please upload a CSV file to see the data and statistics.") |