Skip to content

Conversation

@rok
Copy link
Member

@rok rok commented Jan 30, 2026

See #48619 (comment)

Rationale for this change

Fix CI failures

What changes are included in this PR?

Tests are made more general to allow for Pandas 2 and Pandas 3 style string types

Are these changes tested?

By CI

Are there any user-facing changes?

No

@rok rok changed the title [MINOR] Fix doctests failing on pandas 3 string types examples MINOR: [Doc][CI] Fix doctests failing on pandas 3 string types examples Jan 30, 2026
@apache apache deleted a comment from github-actions bot Jan 30, 2026
@rok rok force-pushed the fix_doctest_issues branch from 060eab3 to f14ade1 Compare January 30, 2026 16:27

>>> print(dict_array.type)
dictionary<values=string, indices=int64, ordered=0>
dictionary<values=...string, indices=int64, ordered=0>
Copy link
Member

Choose a reason for hiding this comment

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

This one should not be needed? (the dictionary here is created just through pyarrow, no pandas involved?)

7 baz
dtype: category
Categories (3, object): ['foo', 'bar', 'baz']
Categories (3, ...): ['foo', 'bar', 'baz']
Copy link
Member

@jorisvandenbossche jorisvandenbossche Jan 30, 2026

Choose a reason for hiding this comment

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

FWIW, I think if we know the doctests will run on an instance with pandas>=3, I would just update those to use pandas 3 output, because that will be less confusing for people reading the docs ("what do those 3 dots mean here?").

Suggested change
Categories (3, ...): ['foo', 'bar', 'baz']
Categories (3, str): ['foo', 'bar', 'baz']

>>> schema
f0: int64
f1: string
f1: ...string
Copy link
Member

Choose a reason for hiding this comment

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

Also here, is this actually needed? The example here is pure pyarrow, and that should always be using pyarrow's default of "string" ?

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants