Skip to content

ArrowStringArray: delay/conditionally import pyarrow.compute #42863

Open
@jorisvandenbossche

Description

@jorisvandenbossche

We currently check if pyarrow is available (and a sufficiently recent version), and if that's the case, simply import pyarrow.compute:

if not pa_version_under1p0:
import pyarrow as pa
import pyarrow.compute as pc

However, in theory, it is possible to have a pyarrow installation without pyarrow.compute support (it's an optional component when building). In that case the import pyarrow.compute as pc import will fail giving a slightly confusing error message + it will fail on a basic import of pandas (even without using any pyarrow functionality).

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCompatpandas objects compatability with Numpy or Python functionsStringsString extension data type and string data

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions