I would like to convert some bearing measurements to azimuth, but I can't figure out how I could do this and separate the values (strings + numbers + characters) from my column.
import pandas
df = pd.DataFrame({'Bearing':["N47.00E","N48.50W","S67.00E"]})
I should get results like:
Azimuth
47
311.5
113
The calculation should be like this
N x E: Maintain the mid number
S x E: Azimuth = 180 - Bearing
S x W: Azimuth = 180 + Bearing
N x W: Azimuth = 360 - Bearing
Anyone could help me?
First, create a dataframe containing your factors:
Then multiply with it:
Output: