Skip to content

Commit d54a205

Browse files
authored
apacheGH-48759: [Python] Remove skip condition for pandas/issues/50127 (apache#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 (pandas-dev/pandas#50127) that caused `NotImplementedError: |S3` when roundtripping DataFrames with bytes column names. This issue was already fixed in commit e2ac52d (apacheGH-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: apache#48759 Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
1 parent 4f77a06 commit d54a205

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

python/pyarrow/tests/test_pandas.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,6 @@ def test_mixed_column_names(self):
534534
preserve_index=True)
535535

536536
def test_binary_column_name(self):
537-
if Version("2.0.0") <= Version(pd.__version__) < Version("3.0.0"):
538-
# TODO: regression in pandas, hopefully fixed in next version
539-
# https://issues.apache.org/jira/browse/ARROW-18394
540-
# https://github.com/pandas-dev/pandas/issues/50127
541-
pytest.skip("Regression in pandas 2.0.0")
542537
column_data = ['い']
543538
key = 'あ'.encode()
544539
data = {key: column_data}
@@ -3323,12 +3318,6 @@ def _fully_loaded_dataframe_example():
33233318

33243319
@pytest.mark.parametrize('columns', ([b'foo'], ['foo']))
33253320
def test_roundtrip_with_bytes_unicode(columns):
3326-
if Version("2.0.0") <= Version(pd.__version__) < Version("3.0.0"):
3327-
# TODO: regression in pandas, hopefully fixed in next version
3328-
# https://issues.apache.org/jira/browse/ARROW-18394
3329-
# https://github.com/pandas-dev/pandas/issues/50127
3330-
pytest.skip("Regression in pandas 2.0.0")
3331-
33323321
df = pd.DataFrame(columns=columns)
33333322
table1 = pa.Table.from_pandas(df)
33343323
table2 = pa.Table.from_pandas(table1.to_pandas())

0 commit comments

Comments
 (0)