-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Add tests string series min max #45505
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
Conversation
In line with pandas-dev#31746
def test_reductions_series_strings(): | ||
# GH#31746 | ||
ser = Series(["a", "b"], dtype="string") | ||
assert ser.max() == "b" |
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.
Could you use pytest.mark.parameterize
over min/max
and the expected result?
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.
Of course!
list_str = ["a", "b"] | ||
ser = Series(list_str, dtype="string") | ||
res_operation_serie = getattr(ser, operation)() | ||
func_builtin_python = __builtins__[operation] |
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.
Hmm instead of this could you hardcore the expected (a or b) with the parameterize as well?
thanks @NumberPiOso |
Add tests for max and min aggregation at string series
In line with #31746