About 10,300 results
Open links in new tab
  1. pandas.DataFrame.replace — pandas 3.0.1 documentation

    For example, {'a': 1, 'b': 'z'} looks for the value 1 in column ‘a’ and the value ‘z’ in column ‘b’ and replaces these values with whatever is specified in value.

  2. Python String replace () Method - W3Schools

    Definition and Usage The replace() method replaces a specified phrase with another specified phrase. Note: All occurrences of the specified phrase will be replaced, if nothing else is specified.

  3. Python String replace () Method - GeeksforGeeks

    Nov 17, 2025 · The replace () method returns a new string where all occurrences of a specified substring are replaced with another substring. It does not modify the original string because Python strings are …

  4. Python String Replace: Change Characters Easily - PyTutorial

    Feb 21, 2026 · Learn how to replace characters in Python strings using the replace() method, translate(), and regex with clear examples for beginners and developers.

  5. Pandas DataFrame replace () – by Examples

    Oct 9, 2024 · pandas.DataFrame.replace () function is used to replace values in columns (one value with another value on all columns). It is a powerful tool for data cleaning and transformation.

  6. How to Replace Values in a List Using Python?

    Mar 5, 2025 · Learn how to replace values in a list using Python with methods like indexing, list comprehension, and `map ()`. This guide includes step-by-step examples.

  7. Replace Strings in Python: replace (), translate (), and Regex

    May 4, 2025 · In Python, you can replace strings using the replace() and translate() methods, or with regular expression functions like re.sub() and re.subn(). Additionally, you can replace substrings at …

  8. How to Replace a String in Python

    In this tutorial, you'll learn how to remove or replace a string or substring. You'll go from the basic string method .replace () all the way up to a multi-layer regex pattern using the sub () function from …

  9. Python String replace () - Programiz

    In this tutorial, we will learn about the Python replace () method with the help of examples.

  10. Python | Pandas dataframe.replace () - GeeksforGeeks

    Jul 11, 2025 · How to replace values in DataFrame in Python? You can replace specific values in a DataFrame using the replace() method. Here's a basic example: 'A': [1, 2, 3], 'B': [4, 5, 6]