-
-
Notifications
You must be signed in to change notification settings - Fork 0
Add Streamlit app with Excel data visualization #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,35 @@ | ||||||||||||||||||
|
|
||||||||||||||||||
| import streamlit as st | ||||||||||||||||||
| import pandas as pd | ||||||||||||||||||
| import plotly.express as px | ||||||||||||||||||
|
|
||||||||||||||||||
| df = pd.read_excel("BASE01.CREDITO.xlsx") | ||||||||||||||||||
|
|
||||||||||||||||||
|
Comment on lines
+6
to
+7
|
||||||||||||||||||
| df = pd.read_excel("BASE01.CREDITO.xlsx") | |
| @st.cache_data | |
| def load_data(path="BASE01.CREDITO.xlsx"): | |
| return pd.read_excel(path) | |
| df = load_data() |
Copilot
AI
Apr 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name df_media_sexo suggests a mean/average (“média”), but the aggregation is .sum(). Rename the variable to match the aggregation (e.g., soma/total) or change the aggregation to .mean() if the intention is an average, to avoid misleading future readers.
Copilot
AI
Apr 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The page title says "Sidebar, Colunas e Abas", but this script only demonstrates tabs/charts (no st.sidebar or st.columns). Consider updating the title to reflect the actual layout being used so the UI description matches the content.
| st.title("Layout: Sidebar, Colunas e Abas") | |
| st.title("Layout: Abas e Gráficos") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pd.read_excel("BASE01.CREDITO.xlsx")relies on the current working directory; when runningstreamlit run .../Streamlit/Codes/part_03_streamlit_excel_tabs_charts.pyfrom the repo root this file is not found (the dataset lives under.../Streamlit/Datasets/and.../Datasets/). Use a path built relative to__file__(e.g.,Path(__file__).parent.parent / "Datasets" / ...) or provide ast.file_uploaderso the app works regardless of where it’s launched from.