Spaces:
Sleeping
Sleeping
File size: 1,866 Bytes
4a832b8 |
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 |
import streamlit as st
import pandas as pd
def run():
st.set_page_config(page_title="Variables Table", layout="wide")
st.title("Variables Table")
# Define the data for the variables table
data = {
"Variable Name": ["age", "sex", "cp", "trestbps", "chol", "fbs", "restecg", "thalach", "exang", "oldpeak", "slope", "ca", "thal", "num"],
"Role": ["Feature", "Feature", "Feature", "Feature", "Feature", "Feature", "Feature", "Feature", "Feature", "Feature", "Feature", "Feature", "Feature", "Target"],
"Type": ["Integer", "Categorical", "Categorical", "Integer", "Integer", "Categorical", "Categorical", "Integer", "Categorical", "Integer", "Categorical", "Integer", "Categorical", "Integer"],
"Demographic": ["Age", "Sex", None, None, None, None, None, None, None, None, None, None, None, None],
"Description": [None, None, None, "Resting blood pressure (on admission to the hospital)", "Serum cholestoral", "Fasting blood sugar > 120 mg/dl", None, "Maximum heart rate achieved", "Exercise induced angina", "ST depression induced by exercise relative to rest", None, "Number of major vessels (0-3) colored by flourosopy", None, "Diagnosis of heart disease"],
"Units": ["years", None, None, "mm Hg", "mg/dl", None, None, "beats per minute", None, None, None, None, None, None],
"Missing Values": ["no", "no", "no", "no", "no", "no", "no", "no", "no", "no", "no", "yes", "yes", "no"]
}
# Create DataFrame from the data
df = pd.DataFrame(data)
# Display the DataFrame as a table with larger size
st.table(df.style.set_table_styles([{'selector': 'tr:hover','props': [('background-color', '#95caff')]}]))
# Add a footer
st.markdown("---")
st.write("Made with ❤️ by Viga, Hanum, & Robit")
if __name__ == "__main__":
run() |