datashader icon indicating copy to clipboard operation
datashader copied to clipboard

Support for polars dataframes

Open muendlein opened this issue 1 year ago • 4 comments

As Polars is becoming more and more popular I am wondering if there are any consideration to support its dataframes. Given the performance oriented focus of this package, it might be solid contender.

muendlein avatar Apr 09 '23 00:04 muendlein

Yes, polars is certainly something we would like to add support for.

ianthomas23 avatar Apr 11 '23 15:04 ianthomas23

Other plotting libraries have been adding support for polars (and others) by supporting the __dataframe__ interchange protocol (https://data-apis.org/dataframe-protocol/latest/index.html)

  • https://github.com/altair-viz/altair/pull/2888
  • https://github.com/mwaskom/seaborn/pull/3369

I think this would be a great solution here as it would allow polars as well as other tabular libraries to be used with data shader.

My use case would be to provide a dataframe interface to plotting libraries from an AnnData object. This use case would rely on data shader only requesting the columns it actually needs for a plot, and not try to request every column of the dataframe..

ivirshup avatar Sep 06 '23 12:09 ivirshup

Yes, it is a good idea. It just needs someone to volunteer to do the required work.

ianthomas23 avatar Sep 06 '23 13:09 ianthomas23

I wonder if Narwhals could be leveraged?

hathawayj avatar Jul 15 '24 19:07 hathawayj