Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| violin_fig = px.violin( | ||
| filtered_long[filtered_long["Disease"] == disease], | ||
| x="Disease", | ||
| y="SchwannCellDensity", | ||
| box=True, |
There was a problem hiding this comment.
Prevent callback errors when filters yield no rows
The Dash callback builds the violin plot from filtered_long[filtered_long['Disease'] == disease] without checking whether that slice contains data. If the age slider is narrowed to a range that has no patients with the selected disease (which is easy to hit with this 30‑row sample set), plotly.express.violin raises ValueError: DataFrame is empty, causing the callback to fail and the dashboard graphs to stop updating. Guard for empty frames or return a placeholder figure before calling Plotly.
Useful? React with 👍 / 👎.
Summary
Testing
pip install -r requirements.txt(fails: ProxyError – Tunnel connection failed: 403 Forbidden)Codex Task