Skip to content

fix: pandas DataFrame with non-default Index was resulting in scrambled data in scatter_matrix - #4921

Merged
emilykl merged 1 commit into
plotly:masterfrom
MarcoGorelli:index-alignment
Dec 5, 2024
Merged

emilykl merged 1 commit into
plotly:masterfrom
MarcoGorelli:index-alignment

Conversation

@MarcoGorelli

@MarcoGorelli MarcoGorelli commented Dec 1, 2024 •

Copy link
Copy Markdown
Contributor

These issue get closed "for free" with the latest Narwhals release, as a result of narwhals-dev/narwhals#1474 having been addressed:

Furthermore, it allows for the Plotly codebase to be simplified a bit, as maybe_reset_index isn't necessary any more. So, I've:

  • made that simplification
  • bumped the minimum Narwhals
  • added a test to check this stays fixed

Demo:

Latest stable plotly release:

image

This branch:

image

@MarcoGorelli
MarcoGorelli marked this pull request as ready for review December 1, 2024 11:49
@gvwilson
gvwilson requested a review from emilykl December 1, 2024 22:33
@gvwilson gvwilson added community community contribution fix fixes something broken labels Dec 1, 2024

@emilykl emilykl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, @MarcoGorelli. Sorry for the delayed review, I wanted to take the time to make sure I understood the differences between the Pandas and Narwhals index behavior. Looks good! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community community contribution fix fixes something broken

Projects

None yet

3 participants