Skip to content
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

fix negative n for str.replace with arrow string #56406

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

rohanjain101
Copy link
Contributor

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

Shouldn't we rather raise?

@rohanjain101
Copy link
Contributor Author

You mean raise if n <= -2? (since n=-1 on the docs means unlimited), I can make that change, but I was trying to follow the behavior of pd.StringDtype(), which seems like it allows any negative value to be unlimited.

@phofl
Copy link
Member

phofl commented Dec 8, 2023

Ah that's fine then

@phofl phofl merged commit 46c8da3 into pandas-dev:main Dec 8, 2023
44 checks passed
@phofl
Copy link
Member

phofl commented Dec 8, 2023

thx @rohanjain101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Series.str.replace hangs indefinitely
2 participants