You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ParthivNaresh (via GitHub)" <gi...@apache.org> on 2023/02/07 13:21:38 UTC

[GitHub] [arrow] ParthivNaresh opened a new issue, #34070: BUG: mode() throws an error for a series with string[pyarrow] dtype

ParthivNaresh opened a new issue, #34070:
URL: https://github.com/apache/arrow/issues/34070

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   ```python
   import pandas as pd
   
   series = pd.Series(["red", "yellow", "red", "green", pd.NA], dtype="string[pyarrow]")
   series.mode()
   =======================================
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File ".../pandas/core/series.py", line 2072, in mode
       res_values = values._mode(dropna=dropna)
     File ".../pandas/core/arrays/arrow/array.py", line 1311, in _mode
       modes = pc.mode(data, pc.count_distinct(data).as_py())
     File ".../pyarrow/compute.py", line 255, in wrapper
       return func.call(args, options, memory_pool)
     File "pyarrow/_compute.pyx", line 355, in pyarrow._compute.Function.call
     File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
     File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
   pyarrow.lib.ArrowNotImplementedError: Function 'mode' has no kernel matching input types (string)
   ```
   Using the `string[pyarrow]` dtype prevents the usage of `mode()`.
   
   pandas : 2.0.0.dev0+1430.gb2a26ecc5
   numpy : 1.23.4
   pyarrow : 9.0.0
   
   
   ### Component(s)
   
   Python


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] [C++] Implement "mode" kernel for string (binary) types [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic closed issue #34070: [C++] Implement "mode" kernel for string (binary) types
URL: https://github.com/apache/arrow/issues/34070


-- 
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: issues-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] jorisvandenbossche commented on issue #34070: [C++] Implement "mode" kernel for string (binary) types

Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche commented on issue #34070:
URL: https://github.com/apache/arrow/issues/34070#issuecomment-1420990765

   @ParthivNaresh I re-framed your report to an enhancement request to add support to the "mode" kernel for string data. Given that string data can be sorted and compared, it seems it can make sense to also support the "mode" operation.
   
   If you want support for this on the shorter term in pandas, you might want to report the issue to the pandas issue tracker instead (they could potentially work around the lack of "mode" support for now).


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


Re: [I] [C++] Implement "mode" kernel for string (binary) types [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on issue #34070:
URL: https://github.com/apache/arrow/issues/34070#issuecomment-3921683425

   This issue has been marked as stale because it has had no activity in the past 2 years. Please remove the stale label or comment below, or this issue will be closed in 14 days.


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