pandas 3 support: convert Arrow extension columns; lift pandas<3 pin - #8
Open
jefferis wants to merge 2 commits into
Open
pandas 3 support: convert Arrow extension columns; lift pandas<3 pin#8jefferis wants to merge 2 commits into
jefferis wants to merge 2 commits into
Conversation
Recover pandas extension-array columns that reticulate leaves as raw python objects -- above all pandas 3.0's default Arrow-backed string dtype (PDEP-14). String columns (is_string_dtype: str/string/large_string family) become R character vectors; other Arrow columns (e.g. int64[pyarrow]) are classified like object columns, so Arrow-backed ids map to the same R types as native ones. Adds tests using explicit Arrow dtypes (reproducing the ArrowStringArray under pandas 2 + pyarrow) and regenerates pandas2df.Rd.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ci-provision-pandas-pin #8 +/- ##
===========================================================
+ Coverage 66.18% 67.47% +1.28%
===========================================================
Files 6 6
Lines 485 495 +10
===========================================================
+ Hits 321 334 +13
+ Misses 164 161 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #7 — base is
ci-provision-pandas-pin, notmain. Merge #7 first; GitHub will then retarget this tomainand the diff collapses to just the two commits below. Hold until the wider ecosystem is ready for pandas 3.Changes
R/convert.R—pandas2df()now converts pandas extension-array columns that reticulate leaves as raw python objects, in particular pandas 3.0's default Arrow-backed string dtype (PDEP-14): string columns become R character vectors, and other Arrow columns (e.g.int64[pyarrow]ids) map to the same R types as their native-dtype equivalents. Newis_string_dtype()helper + tests exercisingstring[pyarrow]andint64[pyarrow].R/env.R— lift thepandas < 3pin back topandas, now thatpandas2df()handles the Arrow dtype; NEWS/comment updated.Verification
Verified on CI against real pandas 3.0.5 (via a temporary unpin during development): test-coverage FAIL 0 SKIP 0 PASS 140; R-CMD-check FAIL 0 SKIP 3 (the pyarrow-gated Arrow tests skip only where pyarrow is absent).