0
             Bearing
Point 1      0.000000
Point 2      81.847356
Point 3      121.959755
Point 4      351.612081
Point 5      189.582973
Point 6      242.890690
Point 7      41.095348

So far I have this but am confused about the trunc function, would like to add a new column which gives these bearings in DMS. (Ignore the 7, there are more columns which I did not type out).

new7 = []
temp7 = 0

for idx in range (0,len(dataframe)):
  if idx==0:
    new7.append(0)
  else:
    temp7 =mt.trunc(dataframe.iloc[idx][8])
    new7.append(temp7)

dataframe["DMS"] = new7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.