polars icon indicating copy to clipboard operation
polars copied to clipboard

Less-used temporal methods: candidates for removal / migration

Open MarcoGorelli opened this issue 1 year ago • 6 comments

I'd like to suggest removing some less-used temporal methods to slim down the main Polars package and API a bit. Happy to maintain these long-term in polars-xdt if people agree.

Strong candidates (IMO):

~Debatable:~

MarcoGorelli avatar Jan 07 '24 10:01 MarcoGorelli

I found combine to be extremely useful. I believe I requested it at the time. And I've never done anything fancy with datetimes. Combining date/time columns into a datetime is a common enough operation.

The other 'debatable' ones I also think are valuable enough.

Not sure about the 'strong candidates'.

stinodego avatar Jan 07 '24 10:01 stinodego

Let's wait a bit. I don't think they hurt us at the moment. Let's also put them in polars-xdt. Once we see that that will get the familiarity it then deserves we can move logic.

Open to host polars-xdt under the polars org?

ritchie46 avatar Jan 07 '24 10:01 ritchie46

Sounds good, I'm not sure where to draw the line between 'core' and 'plugin'

The two 'strong candidates' - one came from https://stackoverflow.com/questions/76578147/dst-temporal-feature-from-timestamp-using-polars, then other from a comment there. If those two requests had come in today, I think the response would be "plugin!", but at the time I don't think there was that option

Is there a way to see how much traffic each docs page gets? That may give a better idea of how widely they're being used

Open to host polars-xdt under the polars org?

if you're happy with that, then yeah, totally!

MarcoGorelli avatar Jan 07 '24 10:01 MarcoGorelli

Yeap, at that time there wasn't.

if you're happy with that, then yeah, totally!

Cool, I will set this up. I will set you as the maintainer. We have to be careful, as we don't want to lose github stars. I will follow up on this.

ritchie46 avatar Jan 07 '24 10:01 ritchie46

Don't forget that time series are an important core function these days - I wouldn't look to move all of this outside the mainline package (especially given that it's already there). Anything that isn't in the core package is a potential barrier to entry, as most people just don't go hunting for things that aren't available by default.

I'd also look to go the other way sometimes; I suspect moving business day functionality into the main package would actually be a very popular move, for example 🤣

FYI: combine gets a dedicated shout-out in Modern Polars, and is likely quite widely used (it's a first-class python datetime method too) ;)

alexander-beedie avatar Jan 07 '24 11:01 alexander-beedie

Thanks all for your inputs!

Agree on combine, it was a bad suggestion of mine. Keeping it in Polars, I've crossed it out of the suggestion (along with the other ones in the "debatable" section).

I'd still like to make the case that

  • base_utc_offset
  • dst_offset

aren't broadly useful enough for the main Polars API and are candidate for migration. I'd be surprised if even .001% of users were using them, and as of #12204, I think they're even less useful

Regarding discoverability - polars-xdt is in the pola-rs org now, which should help on that front https://github.com/pola-rs/polars-xdt

MarcoGorelli avatar Jan 07 '24 20:01 MarcoGorelli

I think both of those are useful enough.

stinodego avatar Jan 08 '24 07:01 stinodego

ok sure, happy to let this drop then, thanks all!

MarcoGorelli avatar Jan 08 '24 08:01 MarcoGorelli