ariebovenberg / whenever

⏰ Sensible and typesafe datetimes for Python
https://whenever.rtfd.io
MIT License
362 stars 7 forks source link

Pandas Support #46

Open sterlinm opened 4 months ago

sterlinm commented 4 months ago

I'm not sure if you're much of a pandas user, but I think it would be really nice if these classes could be used in Pandas. Would you be open to providing support via the extension array interface?

ariebovenberg commented 4 months ago

Hi @sterlinm, thanks for taking the time to open this issue 👋

I'm not a pandas user, but I know it's of course very popular. I'm open to providing this type of support, on the following conditions:

  1. pandas does not become a dependency of whenever
  2. the complexity of adding this is low. It risks becoming a maintenance burden otherwise.

At the moment I don't have a clear picture of what the required work is. I'm sure the API docs can clear things up, but my priorities are elsewhere at the moment.

sterlinm commented 4 months ago

If you're not an active pandas user, I'd hesitate to prioritize something like this. If I have some time, I'll experiment with it at some point to get a better sense of how involved it would be.

I think it could be built/packaged separately from the main whenever package to avoid introducing pandas as a dependency. Thanks!

ariebovenberg commented 4 months ago

@sterlinm you're welcome to experiment, and I'm curious for the result.

I expect that we can easily circumvent the pandas dependency.

I'll leave this issue open, but indicate that it's not currently a prio