Uh oh!
There was an error while loading. Please reload this page.
feat: make plotly-express dataframe agnostic via narwhals - #4790
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
MarcoGorelli
commented
Nov 8, 2024
yup, addressed in the latest commit 👌 latest timings: https://www.kaggle.com/code/marcogorelli/visualise-timings?scriptVersionId=205986199 |
emilykl
left a comment
There was a problem hiding this comment.
@FBruzzesi@MarcoGorelli All looks good from our side. You can go ahead and merge when ready.
This was a massive effort, thank you very much for the contribution! 🚀
Hey @emilykl thanks a ton! We really appreciated the collaborative effort! As mention on a few meetings, it led us to investigate deeper and improve narwhals codebase significantly as well, it has been such a win-win! Regarding merging, the branch keeps going out of sync with master, and I will need another approval to merge it myself (and hopefully I need to time it correctly 😇) or you can approve and merge whenever you want. There are no other changes on this PR from our side 🚀 |
emilykl
commented
Nov 13, 2024
@FBruzzesi@MarcoGorelli Merged! 🚀 🎉 💥 |
version 6.0.0 changed how dataframes are accessed (plotly/plotly.py#4790) which (I think) is breaking how django-dashboards reads dataframes
Description
This PR migrates plotly-express module logic from pandas to narwhals. In this way, pandas is not a required dependency for plotly-express (or at least for its entirety - e.g. trendlines will still require pandas for now) and users coming with polars,
pyarrow or other eager dataframes supported in narwhals do not need to depend on pandas in the first place.
Closes#4749
Code PR
plotly.graph_objects, my modifications concern thecodegenfiles and not generated files.modified existing tests.
new tutorial notebook (please see the doc checklist as well).
Out of scope for the PR
Adapt plotly data accordinglyincluded in this PRcc: @MarcoGorelli@LiamConnors