Replacing parts of a column's values

We can also change our data using string methods. Here, we replace the spaces in the RegionName column from our dataset with no space, using the replace method:

data.RegionName.str.replace(' ', '').head()

The following is the output:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.229.159