Files

8 lines
640 B
Markdown
Raw Permalink Normal View History

2026-06-15 15:26:18 +02:00
# strip, replace, split
2026-06-16 13:12:17 +02:00
`strip()` removes leading and trailing whitespace from a string. `replace()` substitutes one substring with another. `split()` divides a string into a list based on a delimiter. These three methods are among the most used for basic text cleaning, applied either to Python strings directly or through the Pandas `.str` accessor on a column.
Visit the following resources to learn more:
- [@article@Python String Methods: split, join, replace, strip & More](https://devnook.dev/cheatsheets/python-string-methods-cheatsheet/)
- [@article@Python String Methods](https://www.w3schools.com/PYTHON/python_ref_string.asp)