December 2018
Beginner to intermediate
682 pages
18h 1m
English
After reading the data, we decide how many variables there are in the dataset. Here, we chose to split the Geolocation column into four variables, but we could have just chosen two for latitude and longitude and used a negative sign to differentiate between west/east and south/north.
There are a few ways to parse the Geolocation column with the methods from the str accessor. The easiest way is to use the split method. We pass it a simple regular expression defined by any character (the period) and a space. When a space follows any character, a split is made, and a new column is formed. The first occurrence of this pattern takes place at the end of the latitude. A space follows the degree character, and a split is formed. The ...