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/06/13 11:13:28 UTC

[GitHub] [arrow] jorisvandenbossche commented on issue #36045: [Python] Improve usability of pc.map_lookup / MapLookupOptions

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

   > 2\. Allow to specify the `occurence` keyword, given that this is not necessarily obvious, it's nice to be able to specify the named argument:
   
   Actually, that errors only because I mis-spelled the keyword name. With the correct name it works:
   
   ```
   >>> pc.map_lookup(arr, pa.scalar("a"), occurrence="all")
   <pyarrow.lib.ListArray object at 0x7f099c96bd00>
   [
     [
       "a1"
     ],
     [
       "a2"
     ],
     [
       "a1"
     ]
   ]
   ```
   
   Wondering if we can provide a better error message in that case, but that might just be a Python/cython behaviour of first checking the positional keywords before the named ones)


-- 
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