#66626·pandas

NumPy/object fallbacks in Arrow-backed arrays

Author: fangchenliCreated Aug 5, 2026Updated Sep 28, 2026
LabelsMaster TrackerUpstream issueArrow

ArrowExtensionArray and ArrowStringArray fall back to NumPy, object dtype, or a Python loop silently in many places. Some of those can be fixed within pandas, but some need upstream work in Arrow. It also has impacts on downstream libraries such as PySpark.

I'll update this tracker incrementally. Some of those are from preliminary investigation and will need a deeper look.

Reductions

  • #69752
  • var on Arrow temporals raises TypeError: ... 'var' may be supported by upgrading pyarrow — the error type is right (datetime64 raises too), but no pyarrow version will support it, so the hint misleads
  • temporal std/sem truncate the float result toward zero instead of rounding, so an exact answer can lose a whole unit: sem of two values 2 days apart gives 23:59:59 for date32, timestamp[s] and duration[s]

Groupby

  • #63416
  • #66625
  • #69488
  • investigate why numeric dtypes are slow compared to the Cython path. Update: Arrow isn't actually slower at aggregating (it's faster), but the only public entry point re-hashes the group keys pandas has already factorized, and that duplicate hash costs more than the aggregation saves.
  • #69717

Indexing

  • time64[ns] index operations truncate to microseconds — three distinct nanosecond values give is_unique == False, and get_loc returns slice(0, 3) instead of 2. PyArrow correctly raises rather than lose precision; ArrowExtensionArray.to_numpy routes around it via np.array(list(data)), which is to_pylist semantics. unique()/drop_duplicates() are correct — they stay in PyArrow. Fix direction: give time types the same i8 routing in _get_engine_target/_get_join_target that timestamp/duration already have. Already being routed around in-tree: #66498 takes from self rather than the merge output specifically because "the join target round-trips through NumPy, lossy for time64[ns]".
  • bool[pyarrow] indexes silently use ObjectEngine. indexes/base.py:255 registers MaskedBoolEngine for it, but the registration is unreachable: _get_engine_target guards on is_numeric_dtype, and ArrowDtype._is_numeric (dtypes.py:2461) is integer|floating|decimal only, carrying a standing # TODO: pa.types.is_boolean? at dtypes.py:2465. One predicate.

Window

  • Arrow temporals bypass the guard that stops NumPy temporals in rolling. _prep_values opens with if needs_i8_conversion(values.dtype): raise NotImplementedError (window/rolling.py:344-348), but that predicate is False for every ArrowDtype temporal. So datetime64[ns].rolling(2).max() correctly raises DataError, while timestamp[s][pyarrow].rolling(2).max() returns [nan, 86400.0, 172800.0] — raw epoch seconds, timestamp identity gone, no warning. Same for duration.

String

Method Resolution Order Shadowing

  • #66335
  • #66339
  • #66431
  • split
  • rsplit
  • extract: rejects unnamed groups (flags and compiled patterns were fixed in #66792)

Missing Arrow Path

  • #63602

Arrow

Missing Kernels

  • modulo: https://github.com/apache/arrow/issues/28497, https://github.com/apache/arrow/issues/46901
  • floordiv: https://github.com/apache/arrow/issues/39386
  • No cumulative_sum/_min/_max for decimal128 — the only reduction family decimal lacks
  • No hash aggregates for dictionary or duration — only count works, so both take a per-group Python loop in pandas
  • No hash_sum for string — groupby.sum() on string falls to a Python loop (29.7 ms vs 2.7 ms for min at N=200k)
  • No utf8_casefold — utf8_lower is not a substitute ("Straße" → straße, Python gives strasse)
  • No per-character translate kernel — .str.translate is a Python loop at object-dtype speed
  • No all-matches regex — extract_regex returns the first match only, so .str.findall has nothing to build on
  • No hash_sum/hash_mean/hash_stddev for date32/time64 — min/max/count only, so those aggregations can't be routed even though min/max can
  • No exact median — only approximate_median (t-digest), which is not exact on any distribution tested: 4.0e-4 relative error on uniform, 1.5e-2 on lognormal(σ=3), 7.6e-2 on low-cardinality integers. It cannot substitute for an exact median.
  • No temporal quantile (timestamp/duration/date32/time64) — apache/arrow#33769 closed 2023-01-26 with no open successor
  • No rank/index_in for dictionary, and list additionally lacks unique/sort_indices — note unique and sort_indices do work for dictionary. Of 37 probed kernels, dictionary is missing 23 and list 30.
  • replace_with_mask missing for duration and dictionary — makes .where()/.mask() rebuild through object. apache/arrow#29558 and #48918 are open but cover list/map/struct only; neither mentions duration or dictionary

Bug

  • pc.utf8_normalize accepts NFC/NFKC but never composes — returns decomposed output
  • floor_temporal/ceil_temporal/round_temporal wrap at ±2³¹ days on the value, not just the multiple — on timestamp[s], 2³¹+5 days floors to a negative timestamp and 2³²+5 days floors to 432,000 s. apache/arrow#50675 guarded the multiple; it merged 2026-07-31, after pyarrow 25.0.0 (2026-07-10), so duration is not yet accepted by these kernels at all — it will inherit the value-side wrap once that ships.

Missing API

  • No way to invoke hash aggregates with precomputed group ids: all 24 hash_aggregate kernels already take a group-id argument, but call_function rejects every one of them (Direct execution of HASH_AGGREGATE functions), and both public entry points, Table.group_by(keys) and Acero's AggregateNodeOptions(aggregates, keys=None), take key columns rather than ids. Arrow isn't actually slower at aggregating (it's faster), but re-hashing keys the caller has already factorized costs more than the aggregation saves. At N=4M/G=1k, group_by().aggregate([]) (hash only) costs 4.0 ms against 0.8 ms for the aggregation itself — the re-hash is ~83% of the call.
  • No zip/interleave: building a list/fixed_size_list of width k from k equal-length arrays. Of 306 compute functions none does this, and make_struct has no struct→list counterpart. First hit was .str.partition(expand=True), worked around pandas-side in #63602.