Skip to content

TST: Added test for json containing the key "last_status_change_at" #34169

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

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pandas/tests/frame/methods/test_describe.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,14 @@ def test_describe_percentiles_integer_idx(self):
],
)
tm.assert_frame_equal(result, expected)


def test_unhashable_dict():
# GH#32409
result = pd.DataFrame(
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @rivera-fernando

What's the difference between result and expected? Can you construct result using .describe (as in the original issue)?

[{"last_status_change_at": {"a": "1"}}, {"last_status_change_at": {"a": "2"}}]
)
expected = pd.DataFrame(
[{"last_status_change_at": {"a": "1"}}, {"last_status_change_at": {"a": "2"}}]
)
tm.assert_frame_equal(result, expected)