-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST (string dtype): fix IO dtype_backend tests for storage of str dtype of columns' Index #59509
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -470,12 +470,12 @@ def test_dtype_backend_string(all_parsers, string_storage): | |
""" | ||
result = parser.read_csv(StringIO(data), dtype_backend="numpy_nullable") | ||
|
||
expected = DataFrame( | ||
{ | ||
"a": pd.array(["a", "b"], dtype=pd.StringDtype(string_storage)), | ||
"b": pd.array(["x", pd.NA], dtype=pd.StringDtype(string_storage)), | ||
} | ||
) | ||
expected = DataFrame( | ||
{ | ||
"a": pd.array(["a", "b"], dtype=pd.StringDtype(string_storage)), | ||
"b": pd.array(["x", pd.NA], dtype=pd.StringDtype(string_storage)), | ||
}, | ||
) | ||
Comment on lines
+473
to
+478
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What this is changing is that the expected result is also created in the |
||
tm.assert_frame_equal(result, expected) | ||
|
||
|
||
|
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.
This changes the tests to essentially just ignore the issue.
We could also verify it explicitly (although it's not the main thing that this test is meant to test) by doing something like:
Which, now I comment that here, is maybe also perfectly fine (not too verbose, compared to the comment I had to add :))