Skip to content

TST (string dtype): follow-up fix for pyarrow 19.0 update #60764

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
Changes from all commits
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
11 changes: 6 additions & 5 deletions pandas/tests/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ def fp(request):

@pytest.fixture
def df_compat():
# TODO(infer_string) should this give str columns?
return pd.DataFrame(
{"A": [1, 2, 3], "B": "foo"}, columns=pd.Index(["A", "B"], dtype=object)
)
return pd.DataFrame({"A": [1, 2, 3], "B": "foo"}, columns=pd.Index(["A", "B"]))


@pytest.fixture
Expand Down Expand Up @@ -686,7 +683,11 @@ def test_parquet_read_from_url(self, httpserver, datapath, df_compat, engine):
with open(datapath("io", "data", "parquet", "simple.parquet"), mode="rb") as f:
httpserver.serve_content(content=f.read())
df = read_parquet(httpserver.url, engine=engine)
tm.assert_frame_equal(df, df_compat)

expected = df_compat
if pa_version_under19p0:
expected.columns = expected.columns.astype(object)
tm.assert_frame_equal(df, expected)


class TestParquetPyArrow(Base):
Expand Down
Loading