I have a land surface temperature raster file and I want the max and min of it.
minLSTresult = arcpy.GetRasterProperties_management(raster_result, "MINIMUM")
minLST = minLSTresult.getOutput(0)
minLST returns u'261.22'. How could I only get the number of it?
Answer
That is simply indicating that the value is a Unicode string. You can use this unicode string in most situations. However, if you need to fully control the type, convert it to float format.
test = unicode('261.22')
>>> test
u'261.22'
>>> type(test)
test2 = float(test)
>>> test2
261.22
>>> type(test2)
No comments:
Post a Comment