Conversation

phofl
  • closes #xxxx (Replace xxxx with the issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@phoflphofl added this to the 2.1.4 milestone Nov 24, 2023
@phoflphofl added StringsString extension data type and string dataArrowpyarrow functionalitylabels Nov 24, 2023
@@ -163,6 +163,12 @@ def test_reset_index_inplace_and_drop_ignore_name(self):
expected = Series(range(2), name="old")
tm.assert_series_equal(ser, expected)

def test_reset_index_drop_infer_string(self):
# GH#56160
ser = Series(["a", "b", "c"], 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.

This test doesn't need to involve the infer_string option?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yikes, added It, thx

@lithomas1

pre-commit.ci autofix

Choose a reason for hiding this comment

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

This LGTM on green.

@lithomas1lithomas1 merged commit 5e0df27 into pandas-dev:main Dec 7, 2023
@lithomas1

thanks @phofl

@lumberbot-appLumberbot (App)

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.1.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 5e0df27fadfeb29e76336b527f4c01cd2f575136
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #56160: BUG: reset_index not preserving object dtype for string option'
  1. Push to a named branch:
git push YOURFORK 2.1.x:auto-backport-of-pr-56160-on-2.1.x
  1. Create a PR against branch 2.1.x, I would have named this PR:

"Backport PR #56160 on branch 2.1.x (BUG: reset_index not preserving object dtype for string option)"

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.

@phoflphofl deleted the reset_index branch December 7, 2023 21:35
phofl added a commit to phofl/pandas that referenced this pull request Dec 7, 2023
…s-dev#56160)

* BUG: reset_index not preserving object dtype for string option

* Fixup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Thomas Li <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply..com>

(cherry picked from commit 5e0df27)
phofl added a commit that referenced this pull request Dec 7, 2023
Sign up for free to join this conversation on . Already have an account? Sign in to comment
Arrowpyarrow functionalityStringsString extension data type and string data
None yet

Successfully merging this pull request may close these issues.