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))