-
Notifications
You must be signed in to change notification settings - Fork 4k
MINOR: [Doc][CI] Fix doctests failing on pandas 3 string types examples #49088
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
base: main
Are you sure you want to change the base?
Conversation
060eab3 to
f14ade1
Compare
docs/source/python/data.rst
Outdated
| 7 baz | ||
| dtype: category | ||
| Categories (3, object): ['foo', 'bar', 'baz'] | ||
| Categories (3, ...): ['foo', 'bar', 'baz'] |
There was a problem hiding this comment.
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?").
| Categories (3, ...): ['foo', 'bar', 'baz'] | |
| Categories (3, str): ['foo', 'bar', 'baz'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to start testing on Pandas 3 exclusively? I believe we have both testing now. (One is not triggered for this PR because the scope is smaller)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do agree to stop doctest on Pandas 2.x.y then we should also update CI appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For general tests (unit tests) we certainly have to test with various pandas versions (i.e. whichever range we claim to support), but personally I think for doctests it is perfectly fine to just have those passing in one specific environment (they are not meant as actual proper tests, but only to ensure the docs are correct and kept up to date)
4d0a733 to
c84c874
Compare
c84c874 to
88da613
Compare
88da613 to
6482c71
Compare
6482c71 to
dcbca14
Compare
dcbca14 to
130bfa4
Compare
|
Thanks for the review @jorisvandenbossche ! Could you take another look before the merge? |
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