Skip to content

Conversation

@fangchenli
Copy link
Member

No description provided.

…eger types

When converting ArrowExtensionArray to string dtype, use PyArrow's native
pc.cast() for integer and string types where the string representation
matches Python's str(). This avoids unnecessary conversion through NumPy.

Float and boolean types still fall back to lib.ensure_string_array because
PyArrow's string representation differs from Python's str():
- Float: 1.0 -> "1" (PyArrow) vs "1.0" (Python)
- Bool: True -> "true" (PyArrow) vs "True" (Python)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@fangchenli fangchenli added Arrow pyarrow functionality Performance Memory or execution speed performance labels Dec 17, 2025
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Looks good!

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

Labels

Arrow pyarrow functionality Performance Memory or execution speed performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants