bjornjorgensen edited a comment on pull request #35747:
URL: https://github.com/apache/spark/pull/35747#issuecomment-1064479400


   Yes, I think it will be easier for users and others to understand what the 
function does if you change the regex to change `bait` as well as the regex to 
change `bat` and `bar`. After reading the PR, I was left with the question of 
why `bait` was also not changed.
   If you change the regex so that the result looks like this
   
   `
   >>> psser = ps.Series(['bat', 'foo', 'bait', 'abc', 'bar', 'zoo'])
   >>> psser.replace(to_replace=r'^ba.$', value='new', regex=True)
   0     new
   1     foo
   2     new
   3     abc
   4     new
   5     zoo
   `
   
   then I think it will be easier to understand.
   
   KISS - Keep It Simple, Stupid


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to