About 19,400,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. How do I replace a character in a string with another character in …

    Nov 18, 2012 · Strings in Python are immutable, so you cannot change them in place. Check out the documentation of str.replace: Return a copy of the string with all occurrences of substring …

  5. python - Replacing instances of a character in a string - Stack …

    Oct 4, 2012 · I wrote this method to replace characters or replace strings at a specific instance. instances start at 0 (this can easily be changed to 1 if you change the optional inst argument to …

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

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

  7. 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 …

  8. python - How to search and replace text in a file - Stack Overflow

    How do I search and replace text in a file using Python 3? Here is my code:

  9. 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 …

  10. Replace all occurrences of a string in a pandas dataframe (Python)

    Sep 6, 2014 · I have a pandas dataframe with about 20 columns. It is possible to replace all occurrences of a string (here a newline) by manually writing all column names: …