Because QGIS opens MS Excell tables with string type only, in processing plugin I need to use any field types.
def deg2dms(degree):
deg = degree
d = int(deg)
m = int((deg - d) * 60)
s = float(((deg - d) * 60 - m) * 60)
return "{}°{}'{}''".format(d, m, round(s, 2))
But code executes with error:
d = int(deg) TypeError: int() argument must be a string, a bytes-like object or a number, not 'QVariant'
How to convert type QVariant to float?