About 15,200,000 results
Open links in new tab
  1. How to use string.replace () in python 3.x - Stack Overflow

    Feb 26, 2012 · The string.replace() is deprecated on python 3.x. What is the new way of doing this?

  2. python - How to replace multiple substrings of a string ... - Stack ...

    After some benchmarking on using replace several times vs regex replacement on a string of increasing length by power of 2 with 100 replacements added, it seems that on my computer …

  3. python - How to replace text in a string column of a Pandas …

    For anyone else arriving here from Google search on how to do a string replacement on all columns (for example, if one has multiple columns like the OP's 'range' column): Pandas has a …

  4. Replace part of a string in Python? - Stack Overflow

    Apr 6, 2012 · I used regular expressions to get a string from a web page and part of the string may contain something I would like to replace with something else. How would it be possible …

  5. How to replace only part of the match with python re.sub

    10 You can do it by excluding the parts from replacing. I mean, you can say to the regex module; "match with this pattern, but replace a piece of it".

  6. python .replace () regex - Stack Overflow

    118 In order to replace text using regular expression use the re.sub function: sub (pattern, repl, string [, count, flags]) It will replace non-everlaping instances of pattern by the text passed as …

  7. Python dictionary replace values - Stack Overflow

    Jan 20, 2017 · In Python 2, if iterating over a large dictionary, use iteritems() instead of items() so that the entire dictionary contents aren't loaded into memory. (This doesn't matter for Python 3 …

  8. python - How to replace whitespaces with underscore? - Stack …

    string.replace(" ", "_") I had this problem a while ago and I wrote code to replace characters in a string. I have to start remembering to check the python documentation because they've got …

  9. string - Python Replace \\ with \ - Stack Overflow

    Mar 3, 2015 · Python Replace \\ with \ [duplicate] Asked 14 years, 9 months ago Modified 3 years, 7 months ago Viewed 201k times

  10. python - Conditional Replace Pandas - Stack Overflow

    May 27, 2017 · python pandas replace conditional-statements series edited Jul 21, 2020 at 8:27 Usama Abdulrehman 1,029 3 13 21