Skip to content

Conversation

yuanx749
Copy link
Contributor

@yuanx749 yuanx749 commented Nov 25, 2024

I thinks this is more like a bug than enhancement, as quoted from the OP:

This conforms to the description in Installation Guide: If the optional dependency is not installed, pandas will raise an ImportError when the method requiring that dependency is called.

# Ensure Registry.find skips ArrowDtype to use StringDtype instead
raise TypeError("string[pyarrow] should be constructed by StringDtype")
if pa_version_under10p1:
raise ImportError("pyarrow>=10.0.1 is required for ArrowDtype")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These lines follow the error raised in ArrowDtype:

if pa_version_under10p1:
raise ImportError("pyarrow>=10.0.1 is required for ArrowDtype")

@mroeschke mroeschke added the Arrow pyarrow functionality label Nov 25, 2024
@mroeschke mroeschke merged commit 1d809c3 into pandas-dev:main Nov 27, 2024
51 checks passed
@mroeschke mroeschke added this to the 3.0 milestone Nov 27, 2024
@mroeschke
Copy link
Member

Thanks @yuanx749

@yuanx749 yuanx749 deleted the pyarrow-nameerror branch November 28, 2024 00:02
tasfia8 pushed a commit to tasfia8/pandas-tasfia8 that referenced this pull request Nov 28, 2024
…pyarrow]" while PyArrow is not installed (pandas-dev#60413)

* Add test

* Fix

* Add note

* Update pandas/tests/dtypes/test_common.py

Co-authored-by: Matthew Roeschke <[email protected]>

* update

* Fix doc warning

---------

Co-authored-by: Matthew Roeschke <[email protected]>
KevsterAmp pushed a commit to KevsterAmp/pandas that referenced this pull request Mar 12, 2025
…pyarrow]" while PyArrow is not installed (pandas-dev#60413)

* Add test

* Fix

* Add note

* Update pandas/tests/dtypes/test_common.py

Co-authored-by: Matthew Roeschke <[email protected]>

* update

* Fix doc warning

---------

Co-authored-by: Matthew Roeschke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arrow pyarrow functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Improve error message when specifying dtype="float32[pyarrow]" while PyArrow is not installed

2 participants