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:
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:
13.58.229.159