Skip to content

BUG: round on object columns no longer raises a TypeError #61399

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

Merged

Conversation

KevsterAmp
Copy link
Contributor

@KevsterAmp KevsterAmp commented May 6, 2025

@KevsterAmp
Copy link
Contributor Author

pre-commit.ci is timing out and the 2 failed unit tests are canceled operations.

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.

Looking good - can you add a note in the 2.3 whatsnew. I think we should backport this as it's a regression.

cc @mroeschke

@@ -72,3 +72,9 @@ def test_round_ea_boolean(self):
tm.assert_series_equal(result, expected)
result.iloc[0] = False
tm.assert_series_equal(ser, expected)

def test_round_dtype_object(self):
ser = Series([0.2], dtype="object")
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a reference to the GitHub issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@rhshadrach rhshadrach added Bug Regression Functionality that used to work in a prior pandas version Numeric Operations Arithmetic, Comparison, and Logical operations labels May 19, 2025
@rhshadrach rhshadrach added this to the 2.3 milestone May 19, 2025
@KevsterAmp KevsterAmp requested a review from rhshadrach May 20, 2025 11:06
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

@mroeschke
Copy link
Member

@KevsterAmp could you target this PR to main? We have a process to backport this PR to the 2.3.x branch after it is merged to main

@KevsterAmp KevsterAmp changed the base branch from 2.3.x to main May 20, 2025 23:28
@KevsterAmp KevsterAmp requested a review from attack68 as a code owner May 20, 2025 23:28
@KevsterAmp KevsterAmp force-pushed the bug/series-round-object-typeerror branch from 1fdee5b to 8c472b9 Compare May 20, 2025 23:33
@KevsterAmp
Copy link
Contributor Author

Rebased to main and forced push the branch.

@mroeschke since we're targetting to main. Should I add to whatsnew/v3.0.0.rst and remove the current whatsnew/v2.3.0.rst?

@KevsterAmp KevsterAmp requested a review from mroeschke May 20, 2025 23:46
@mroeschke
Copy link
Member

Should I add to whatsnew/v3.0.0.rst and remove the current whatsnew/v2.3.0.rst

No need. It's implied that all fixes in 2.3 apply to 3.0

@mroeschke mroeschke merged commit 6a2da7a into pandas-dev:main May 21, 2025
44 checks passed
@mroeschke
Copy link
Member

Thanks @KevsterAmp

Copy link

lumberbot-app bot commented May 21, 2025

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.3.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 6a2da7ad16cff82f0eadbec04e921baf6c0ae8fb
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #61399: BUG: round on object columns no longer raises a TypeError'
  1. Push to a named branch:
git push YOURFORK 2.3.x:auto-backport-of-pr-61399-on-2.3.x
  1. Create a PR against branch 2.3.x, I would have named this PR:

"Backport PR #61399 on branch 2.3.x (BUG: round on object columns no longer raises a TypeError)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Numeric Operations Arithmetic, Comparison, and Logical operations Regression Functionality that used to work in a prior pandas version Still Needs Manual Backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: round on object columns no longer raises a TypeError
3 participants