I created a function to read in a csv file and then write some of the data from the csv file into another file. I had to manipulate some of the data in the original csv file before I write it. I will probably have to do that manipulation a lot during the next couple months so I wrote another function to just do that manipulation, but I am having trouble calling in the function in my other function.
this is the function I am trying to call in:
import sys
import math
def convLatLon(measurement): # should be in '##.####' format
tpoint=float(measurement)
point_deg=math.floor(measurement) # find the degree for lat and lon
dpoint=tpoint-point_deg #subtract the lat value from just the degs to get the decimal fraction
pointmin=dpoint * 60 # find the degree mins
npoint= str(point_deg) + str(pointmin)
print(npoint)
How do I call in this function in another function? They are currently in the same directory. I am used to Matlab and thought it would be a simple call in command but I can not seem to figure it out. Any help will be greatly apprectiated.
Shay