ibis icon indicating copy to clipboard operation
ibis copied to clipboard

Possibility to extract isoyear and isoweekday (or weekday) from a timestamp column.

Open kajen3 opened this issue 10 months ago • 3 comments

Is your feature request related to a problem?

No response

What is the motivation behind your request?

I'm working on a POC to migrate from pandas to ibis. Since pandas (and also duckdb) support this, it would be great if this is possible with ibis as well.

Describe the solution you'd like

Add new methods that expose the functionality.

What version of ibis are you running?

8.0.0

What backend(s) are you using, if any?

DuckDB

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

kajen3 avatar Apr 17 '24 18:04 kajen3

Thanks for the issue! Seems like a nice addition.

cpcloud avatar Apr 17 '24 18:04 cpcloud

I don't quiet understand all of the internals, but from what I understand this should add the isoweekday functionality. However I do not understand what day_of_week in (ibis/expr/types/temporal.py) currently is supposed to do.

kaijennissen avatar Apr 18 '24 14:04 kaijennissen

I commented on the PR (https://github.com/ibis-project/ibis/pull/9003#issuecomment-2064032794). Let's continue the discussion over there.

cpcloud avatar Apr 18 '24 14:04 cpcloud