Open MarcoGorelli opened 2 months ago
Wouldn't it be better to use something like Ibis?
Ibis supports Polars as well as many other backends.
thanks @kylemcmearty
something like Ibis
Great idea - may I suggest taking a look at Narwhals? This is what Altair and scikit-lego use to support multiple dataframe inputs with negligible impact / dependencies / overhead. Disclaimer: i'm the original author of Narwhals, but I'd be happy to put in the work to make this happen if it would be welcome
I think it's a good idea but haven't thought about the implementation. Off the top of my head there is some pre-processing and data checks that use pandas DataFrame / Series APIs, although it should be all standard stuff.
How would ibis or Narwhals work? Would we just wrap the input in the common interface, replace all the methods, and produce an output with the same type as the input? Seems fairly safe to me, happy to support it.
Have you considered supporting Polars dataframes as input?