Skip to content

Conversation

skalwaghe-56
Copy link
Contributor

@skalwaghe-56 skalwaghe-56 commented Sep 2, 2025


This PR adds a regression test for a bug where inserting and then deleting
a column in a DataFrame with two-level MultiIndex columns (with a Timestamp
level) used to raise a RecursionError.

The bug is already fixed on main, but this test makes sure it won’t come back.

Test location: pandas/tests/frame/indexing/test_insert.py
Test method: TestDataFrameInsert.test_insert_delete_mixed_multiindex_columns

@skalwaghe-56
Copy link
Contributor Author

Hi, I've opened a PR which adds a regression test for this issue: #56853.

@skalwaghe-56
Copy link
Contributor Author

All checks have passed, I request one of the members to review the changes and kindly merge this PR. Thanks :)

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@skalwaghe-56 skalwaghe-56 force-pushed the test-fix-56853 branch 2 times, most recently from a0fc10b to fe872e2 Compare September 3, 2025 10:28
@skalwaghe-56
Copy link
Contributor Author

Hi @rhshadrach,

Thanks for the review! I’ve updated the test as suggested.

Please let me know if there’s anything else I should adjust.

@skalwaghe-56
Copy link
Contributor Author

@rhshadrach This is ready for a review after the checks are done!

@skalwaghe-56
Copy link
Contributor Author

@rhshadrach Its ready for re-review.

@skalwaghe-56
Copy link
Contributor Author

@rhshadrach Rebased it and all the checks have been passed!

@Aniketsy
Copy link
Contributor

Aniketsy commented Sep 4, 2025

@skalwaghe-56 Thanks for the contribution! Please be patient maintainers will review and provide feedback when they have time. No need to repeatedly request reviews.

@skalwaghe-56
Copy link
Contributor Author

@Aniketsy Thanks for your comment will wait!

@jorisvandenbossche jorisvandenbossche added Testing pandas testing functions or related to the test suite MultiIndex labels Sep 5, 2025
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@skalwaghe-56
Copy link
Contributor Author

Looks good to me, thanks!

Thank you!

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

lgtm

@rhshadrach rhshadrach added this to the 3.0 milestone Sep 6, 2025
@rhshadrach rhshadrach merged commit 7f670c1 into pandas-dev:main Sep 6, 2025
38 checks passed
@rhshadrach
Copy link
Member

Thanks @skalwaghe-56!

@skalwaghe-56
Copy link
Contributor Author

Thank you! @rhshadrach

@skalwaghe-56 skalwaghe-56 deleted the test-fix-56853 branch September 6, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MultiIndex Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Insert then delete column into MultiIndex with timestamps leads to RecursionError
4 participants