Skip to content

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
@phofl
Copy link
Member

phofl commented Dec 8, 2023

thx @rohanjain101

@jbrockmendel
Copy link
Member

This should probably be the same for ArrowStringArray._str_replace?

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
3 participants