Skip to content

Conversation

@harupy
Copy link
Contributor

@harupy harupy commented Dec 22, 2025

@harupy harupy changed the title BUG: Fix NotImplementedError when comparing ArrowExtensionArray to range BUG: Fix NotImplementedError when comparing ArrowExtensionArray to range Dec 22, 2025
@harupy harupy force-pushed the fix-arrow-range-comparison-63429 branch from 81de13c to 8249e96 Compare December 22, 2025 09:16
@harupy harupy force-pushed the fix-arrow-range-comparison-63429 branch from 8249e96 to 7fdbbf1 Compare December 22, 2025 09:29
Comment on lines +3822 to +3825
def test_comparison_with_range():
# GH#63429
df = pd.DataFrame({"a": [0, 1], "b": [2, 3]})
result = df.columns == range(len(df.columns))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def test_comparison_with_range():
# GH#63429
df = pd.DataFrame({"a": [0, 1], "b": [2, 3]})
result = df.columns == range(len(df.columns))
def test_comparison_with_range(data):
# GH#63429
ser = pd.Series(data)
result = ser == range(len(ser))

To make this test more minimal and test with a wider range of types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: NotImplementedError: eq not implemented for <class 'range'> when comparing columns and range in pandas 3.0.0rc0 with pyarrow

2 participants