Skip to content

Conversation

@wdyy20041223
Copy link
Contributor

#59153)

@wdyy20041223
Copy link
Contributor Author

pre-commit.ci autofix

Comment on lines 510 to 512
result = df.loc[("A", None), :]
expected_row = Series([12.0, 13.0], index=[0, 1], name=("A", np.nan))
tm.assert_series_equal(result, expected_row)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
result = df.loc[("A", None), :]
expected_row = Series([12.0, 13.0], index=[0, 1], name=("A", np.nan))
tm.assert_series_equal(result, expected_row)

I don't think we need to test this follow up

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, i will remove the unnecessary test. thanks for your suggestion!

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Nov 7, 2025
@wdyy20041223
Copy link
Contributor Author

sure, i will remove the unnecessary test. thanks for your suggestion!

@wdyy20041223
Copy link
Contributor Author

pre-commit.ci autofix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Testing pandas testing functions or related to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Enlarging multilevel index fails if one or more level keys are None

2 participants