Spaces:
Sleeping
Sleeping
Download Streamlit_Lecture/app_inclass_task.py from Tryfonas/WeeklyAssignment_Part2: direct link, hf CLI and curl.
- Browser
- Download file 429 Bytes
-
https://huggingface.co/spaces/Tryfonas/WeeklyAssignment_Part2/resolve/0e2c35aa5c0c9cd2f62af1fdeffc72ac1bddfa96/Streamlit_Lecture/app_inclass_task.py
- Command line
-
hf download hf://spaces/Tryfonas/WeeklyAssignment_Part2@0e2c35aa5c0c9cd2f62af1fdeffc72ac1bddfa96/Streamlit_Lecture/app_inclass_task.py
-
curl -L -o app_inclass_task.py https://huggingface.co/spaces/Tryfonas/WeeklyAssignment_Part2/resolve/0e2c35aa5c0c9cd2f62af1fdeffc72ac1bddfa96/Streamlit_Lecture/app_inclass_task.py
429 Bytes
| # Import necessary libraries | |
| import streamlit as st | |
| import pandas as pd | |
| st.title('my shitty app ') | |
| file_path='https://raw.githubusercontent.com/aaubs/ds-master/main/apps/M1-attrition-streamlit/HR-Employee-Attrition-synth.csv' | |
| data=pd.read_csv(file_path) | |
| selected=st.sidebar.selectbox("Select Variable of Interest", ['Department','Gender']) | |
| st.table(data.groupby(['Attrition',selected])['MonthlyIncome'].mean()) |