This is an automated email from the ASF dual-hosted git repository.

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new d54a2051cf GH-48759: [Python] Remove skip condition for 
pandas/issues/50127 (#48760)
d54a2051cf is described below

commit d54a2051cf9020a0fdf50836420c38ad14787abb
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Tue Jan 13 22:18:48 2026 +0900

    GH-48759: [Python] Remove skip condition for pandas/issues/50127 (#48760)
    
    ### Rationale for this change
    
    Tests `test_binary_column_name` and `test_roundtrip_with_bytes_unicode` 
were being skipped on pandas 2.0+ due to a pandas regression 
(https://github.com/pandas-dev/pandas/issues/50127) that caused 
`NotImplementedError: |S3` when roundtripping DataFrames with bytes column 
names.
    
    This issue was already fixed in commit e2ac52d661d (GH-44171) by changing 
an `if` statement to `elif` in `_reconstruct_columns_from_metadata()`. The fix 
prevents bytes-typed columns from falling through to the `level.astype(dtype)` 
call that triggered the pandas error.
    
    ### What changes are included in this PR?
    
    Remove the skip conditions from two test cases.
    
    ### Are these changes tested?
    
    Yes all related tests pass.
    
    ### Are there any user-facing changes?
    
    No.
    
    * GitHub Issue: #48759
    
    Authored-by: Hyukjin Kwon <[email protected]>
    Signed-off-by: Raúl Cumplido <[email protected]>
---
 python/pyarrow/tests/test_pandas.py | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/python/pyarrow/tests/test_pandas.py 
b/python/pyarrow/tests/test_pandas.py
index 481292e1e6..cecf10f216 100644
--- a/python/pyarrow/tests/test_pandas.py
+++ b/python/pyarrow/tests/test_pandas.py
@@ -534,11 +534,6 @@ class TestConvertMetadata:
                                         preserve_index=True)
 
     def test_binary_column_name(self):
-        if Version("2.0.0") <= Version(pd.__version__) < Version("3.0.0"):
-            # TODO: regression in pandas, hopefully fixed in next version
-            # https://issues.apache.org/jira/browse/ARROW-18394
-            # https://github.com/pandas-dev/pandas/issues/50127
-            pytest.skip("Regression in pandas 2.0.0")
         column_data = ['い']
         key = 'あ'.encode()
         data = {key: column_data}
@@ -3323,12 +3318,6 @@ def _fully_loaded_dataframe_example():
 
 @pytest.mark.parametrize('columns', ([b'foo'], ['foo']))
 def test_roundtrip_with_bytes_unicode(columns):
-    if Version("2.0.0") <= Version(pd.__version__) < Version("3.0.0"):
-        # TODO: regression in pandas, hopefully fixed in next version
-        # https://issues.apache.org/jira/browse/ARROW-18394
-        # https://github.com/pandas-dev/pandas/issues/50127
-        pytest.skip("Regression in pandas 2.0.0")
-
     df = pd.DataFrame(columns=columns)
     table1 = pa.Table.from_pandas(df)
     table2 = pa.Table.from_pandas(table1.to_pandas())

Reply via email to