-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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: Add test to ensure DF describe does not throw an error (#32409) #38403
Conversation
) | ||
result = df.describe() | ||
tm.assert_frame_equal(result, expected) | ||
exp_repr = ( |
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.
Don't need to test the repr
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.
Removed this based on the feedback
@@ -298,3 +298,20 @@ def test_describe_percentiles_integer_idx(self): | |||
], | |||
) | |||
tm.assert_frame_equal(result, expected) | |||
|
|||
def test_describe_does_not_raise_error(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.
Could you make this test name a bit more specific (the original issue looks related to dict-like elements)
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.
Thanks for the feedback, I have updated this now
Looks like the CI is failing with this new test. |
@luckyvs1 can you merge master and ping on green |
a6d6353
to
6382b15
Compare
6382b15
to
c81561c
Compare
@jreback I have updated this branch and also is up to date with the latest master and build is now passing, please take another look when you have a chance -- thanks! |
thanks @luckyvs1 |
I confirmed that returning DataFrame from a function will still raise exception "unhashable type: 'list'" if the DataFrame has any columns with illegal characters. I raised this exception with column named '\xa0'. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Notes:
pytest pandas/tests/frame/methods/test_describe.py::TestDataFrameDescribe::test_describe_does_not_raise_error
and tested error format by calling a raise error line in the try blockraise TypeError("Test message")