You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2023/05/23 07:20:46 UTC

[GitHub] [arrow] jorisvandenbossche commented on issue #35704: [Python] KeyError when using compute function month_interval_between()

jorisvandenbossche commented on issue #35704:
URL: https://github.com/apache/arrow/issues/35704#issuecomment-1558681248

   @vcfgv thanks for opening the issue! You are running into a limitation of the pyarrow python bindings (although the error message is not very clear about what is going on ..). 
   The "month_interval_between" kernel returns an array with the interval type with the "year_month" unit. And currently, the python bindings only support the "month_day_nano" unit. 
   
   If you use the "month_day_nano_interval_between" kernel instead, you do get a result, using your example data:
   
   ```python
   >>> pc.month_day_nano_interval_between(array_0, array_1)
   <pyarrow.lib.MonthDayNanoIntervalArray object at 0x7f41b7c9b5e0>
   [
     0M0d0ns,
     0M0d0ns
   ]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org