@author jackzhenguo @desc @date 2019/2/15
9 转为浮点类型
将一个整数或数值型字符串转换为浮点数
In [1]: float(3) Out[1]: 3.0
如果不能转化为浮点数,则会报ValueError:
In [2]: float('a') # ValueError: could not convert string to float: 'a'
python-small-examples/md/9.md at master · data-python/python-small-examples