使用math.exp报错 cannot convert the series to <class 'float'>

R = result['R'].astype(float)
RMAX = result['Time']
Yuce = math.exp(-((R + RMAX) / RMAX))

运行结果及报错内容

TypeError: cannot convert the series to <class 'float'>

math.exp的参数只能是float,不可以是series

用np.exp就可以了

import numpy as np
Yuce = np.exp(-((R + RMAX) / RMAX))