df_Churn=df[df['Churn']=='流失客户'] Rate_Churn=df[df['Churn']=='流失客户'].shape[0]/df['Churn'].shape[0] print('经计算,整体流失率={:.2%}'.format(Rate_Churn)) [/code] ```code 经计算,整体流失率=26.58% 注意,%matplotlib inline不能缺少 plt.rcParams['font.sans-serif']=['Si...