-
Notifications
You must be signed in to change notification settings - Fork 153
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
Should vizro support polars (or other dataframes besides pandas)? #286
Comments
Maybe Ibis is a good fit here? |
I only reacted with 🚀 to this, but to make my position more clear,
this is awesome ⭐
I think it's more of a DX experience, not necessarily performance improvement. If folks are using Polars for whatever reason and then they have to do |
Just seen on their LinkedIn:
|
Any update about Polars integration? More and more people are using it. |
Supporting Narwhals may be a sensible 1st step since we get many birds with one stone... Would also like to support Ibis for the same reason. |
Narwhals looks very interesting, thanks for pointing it out @datajoely. @reouvenzana no updates on this - the current situation outlined in the first post still applies here. It's something I'd still like to do but it just hasn't been prioritised yet. Your comment here though does help to bump the priority up! When we do implement this, whatever we do is likely to closely follow plotly's pattern to begin, so there won't be any performance improvements, just a DX improvement as @astrojuanlu suggested above. @reouvenzana are you interested in using polars in vizro for performance improvements or just for ease of use to avoid doing a |
Nice!
Honestly, it's more about the api / functionalities of Polars (easy method chaining, list columns which are really useful) than performance issues. It's bothersome to have |
Got it, thank you @reouvenzana, that makes a lot of sense 👍 For future reference the logic they use to do the conversion to pandas is here: |
Plotly have now moved to Narwhals, and for Polars many plots get 2-3x faster, especially those involving groupings (e.g. |
Thanks very much for the information! 🙏 I had noticed narwhals was a new dependency when we got Do you happen to know a rough timeframe for a stable release of plotly 6? This issue has got more than enough support now, so let's try and prioritise doing this in the new year 🚀 |
Thanks! I heard from plotly devs that it would be 1-2 weeks after the pre-release. But, given that things always take longer than expected, I wouldn't be surprised if it ended up being early January 😄 Cool, feel free to ping me or anyone else from Narwhals if you'd like any support (and/or wanted to bring any of us in for some pair-programming - we did this with Shiny and it was quite fruitful) |
Amazing, thank you very much for the offer! I don't think we'd get around to doing this before January anyway so will put it on our roadmap and let's be in touch again when we come to doing it. |
Originally posted by @vmisusu in #191 (comment)
I'm opening this issue to see whether other people have the same question so we can figure out what priority it should be. Just hit 👍 if it's something you'd like to see in vizro and feel free to leave and comments.
The current situation (25 January 2024) is:
to_pandas
method, and as of 5.16 it supports dataframes that follow the dataframe interchange protocol (which is nowpip install
able)to_pandas
call. The biggest changes we'd need to make would be to actions code like filtering functionality (FYI @petar-qb). I don't think it would be too hard, but it's certainly not a small task eitherSee also How Polars Can Help You Build Fast Dash Apps for Large Datasets
From @Coding-with-Adam:
FYI @astrojuanlu
Footnotes
https://github.com/plotly/plotly.py/pull/4244 https://github.com/plotly/plotly.py/pull/4272/files https://github.com/plotly/plotly.py/pull/3901 https://github.com/plotly/plotly.py/issues/3637 ↩
The text was updated successfully, but these errors were encountered: