String Type

In this lesson, we introduce the string type.

There are two ways to store strings in pandas, object and StringDtype. In the older version, before 1.0, object is the default option. Since the release of pandas 1.0, we are now able to specify dedicated types.

Let’s go through these important methods to manipulate strings provided by pandas. If you are familiar with basic Python, you’ll find out that most methods are quite the same as Python native string functions. The only difference is that the method of pandas is working on Series or DataFrame.

In this section, we focus on the Series.

Get hands-on with 1200+ tech skills courses.