You could use a fairly simple regular expression:
import re
def isFloat(n):
n = str(n) # optional; make sure you have string
return bool(re.match(r'^-?\d+(\.\d+)?$', n)) # bool is not strictly necessary
# ^ string beginning
# -? an optional -
# \d+ followed by one or more digits (\d* if you want to allow e.g. '.95')
# (\.\d+)? followed by an optional group of a dot and one or more digits
# $ string end
>>> isFloat('4')
True
>>> isFloat('4.567')
True
>>> isFloat('-4.567')
True
>>> isFloat('-4.')
False
>>> isFloat('-4.45v')
False
>>> isFloat('NaN')
False
>>> isFloat('1e1')
False