Python Strings Explained: Index, Slice, Split, Join and More for Data Science - Dr. Colleen Spiegel

Опубликовано: 08 Июнь 2026
на канале: Colleen Spiegel
4
1

In this lesson, we explore Python strings — one of the most commonly used data types in Python and an essential tool for anyone working with real-world data. Text data is everywhere, and knowing how to manipulate strings will serve you in data cleaning, analysis, and beyond.

What we cover in this video:

What strings are and how zero-based indexing applies to them
Accessing individual characters by index position
Slicing a string to extract a substring
Finding the length of a string with len()
Counting occurrences of a character with .count()
Locating a character or substring with .find()
Finding and replacing text with .replace()
Splitting a string into a list of words with .split()
Joining strings together with the + operator
Building dynamic text templates with str.format()

String manipulation is a core skill in data science — whether you're cleaning messy column names, parsing text data, generating reports, or processing natural language. These are the functions you'll reach for again and again.

🗂️ This video is part of a foundational Python for Data Science series, originally recorded for an online data science school and now freely available here.