-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Check float format in object column (#35603) #41668
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
TST: Check float format in object column (#35603) #41668
Conversation
…mal point. May not be good idea to use == to compare floating-point numbers.
To fix PEP8 issues.
Thanks for the pr @mdhsieh! If you look at the linked issue, we actually want to be testing output formatting, not construction. The test should essentially make sure that printing the series from the issue gives the expected result (hardcoded as a string). |
Oh ok, I'll change it. Should the test be moved to |
Needs to be rewritten to check formatting not construction.
Checks if series representation matches expected String.
Either there or |
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.
pls merge master and fix the linting issues.
pandas/tests/series/test_repr.py
Outdated
@@ -240,6 +240,15 @@ def test_series_repr_nat(self): | |||
) | |||
assert result == expected | |||
|
|||
def test_float_repr_in_frame(self): |
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.
can you remove _in_frame (as this a series).
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.
Ok, sure.
It is a Series not a DataFrame.
They should not be there.
Failed pre-commit check since want 2 newlines before defining class, but only had 1.
thanks @mdhsieh |
This test checks if a Series cast to object still shows data in float format.
Ran
pytest pandas/tests/series/test_constructors.py
Output: