Fix: Handle DateIndex in CSA plot_data to resolve crash (fixes #1864)#2302
Fix: Handle DateIndex in CSA plot_data to resolve crash (fixes #1864)#2302shivamlalakiya wants to merge 1 commit intopymc-labs:mainfrom
Conversation
PR SummaryLow Risk Overview Adds a regression test ( Written by Cursor Bugbot for commit 81e7f4f. This will update automatically on new commits. Configure here. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2302 +/- ##
=======================================
Coverage 93.05% 93.05%
=======================================
Files 78 78
Lines 12228 12230 +2
=======================================
+ Hits 11379 11381 +2
Misses 849 849 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
I updated the plotting logic in
mv_its.pyto use directmatplotlibcalls instead ofpandas.plot(). This fixes a crash that occurs when the input data has aDatetimeIndex, as reported in issue #1864.Changes included:
data.plot(ax=ax)withax.plot(data.index, data.values).tests/customer_choice/test_mv_its.pyto verify that plotting with a DateIndex no longer errors.Related Issue
Checklist
pre-commit.ci autofixto auto-fix.📚 Documentation preview 📚: https://pymc-marketing--2302.org.readthedocs.build/en/2302/