Changing the values of a series or column into uppercase

There is a very common string method for converting Python strings to uppercase. We can use this to convert all the values from a column into uppercase. We do this by calling str.upper on the series. Here, we call it on the RegionName column:

data.RegionName.str.upper().head() 

The following is the output:

Get Mastering Exploratory Analysis with pandas now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.