8000 Implement Arrow String Array that is compatible with NumPy semantics by phofl · Pull Request #54533 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Implement Arrow String Array that is compatible with NumPy semantics #54533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Aug 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update
  • Loading branch information
phofl committed Aug 14, 2023
commit da6d67c7447a6c51262c6c4a556684ca41fc08c8
5 changes: 3 additions & 2 deletions pandas/tests/arrays/string_/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import numpy as np
import pytest

from pandas.compat.pyarrow import pa_version_under12p0

from pandas.core.dtypes.common import is_dtype_equal

import pandas as pd
Expand All @@ -13,7 +15,6 @@
ArrowStringArray,
ArrowStringArrayNumpySemantics,
)
from pandas.util.version import Version


@pytest.fixture
Expand Down Expand Up @@ -450,7 +451,7 @@ def test_arrow_array(dtype):
data = pd.array(["a", "b", "c"], dtype=dtype)
arr = pa.array(data)
expected = pa.array(list(data), type=pa.string(), from_pandas=True)
if dtype.storage == "pyarrow" and Version(pa.__version__) <= Version("11.0.0"):
if dtype.storage in ("pyarrow", "pyarrow_numpy") and pa_version_under12p0:
expected = pa.chunked_array(expected)

assert arr.equals(expected)
Expand Down
0