-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: str extract with default value #38003
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
Conversation
Hello @erfannariman! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-05-10 09:42:30 UTC |
@jreback any chance we can decide what we want to do with this PR? If you think this change is not needed, It's fine for me to close it. |
i'd really like a real-world usecase of this. The work-aroudn is actually very simpler (even simpler that what you posted), so not convinced this all that useful. that said prob doesnt' hurt. @erfannariman yeah i guess this is ok, can't hurt. rename default -> fill_value (as that is the term we use else where) and move the note to 1.3. |
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
@erfannariman closing this, if you think of a real case for this, happy to reopen. But agree with Jeff that even if this makes sense, adding more complexity to pandas for a reasonable use case that no user may ever face, it's not worth |
technically it's probably straightforward, we already pass na in other methods and handle it in the wrap_result and _str_map methods (as na_value) i'm not sure a real world case is required to justify this as accepting a na parameter would make str.extract consistent with other str accessor methods. |
I'll reopen this, but I think this enhancement should wait until after str.extract is dispatched to array and the _wrap_result and str_map methods are re-used. #41372 |
@erfannariman can you resolve conflicts and can take another look |
@erfannariman closing as stale. ping if you want to pick this up again. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff