facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.55k stars 4.54k forks source link

Polars support #2622

Open MarcoGorelli opened 2 months ago

MarcoGorelli commented 2 months ago

Have you considered supporting Polars dataframes as input?

kylemcmearty commented 2 months ago

Wouldn't it be better to use something like Ibis?

Ibis supports Polars as well as many other backends.

image

MarcoGorelli commented 2 months ago

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

tcuongd commented 1 month ago

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.