11
Strings and Text Data
Introduction
Most data in the world can be stored as text and strings. Even values that may eventually be numeric data may initially come in the form of text. It’s important to be able to work with text data. This chapter won’t be specific to Pandas. That is, we will mainly explore how you manipulate strings within Python without Pandas. The following chapters will cover some more Pandas materials. Then we will come back to strings and see how it all ties back with Pandas. As an aside, some of the string examples in this chapter come from Monty Python and the Holy Grail.
Learning Objectives
Recall how to subset containers and sequences
Recognize strings are a type of container object
Modify strings based on use case ...
Get Pandas for Everyone: Python Data Analysis, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.