开始使用免费开始使用

探索特征分布

您在视频中看到 'Account_Length' 特征呈正态分布。现在请使用 seaborn 的分布图来可视化以下特征的分布:

  • 'Day_Mins'
  • 'Eve_Mins'
  • 'Night_Mins'
  • 'Intl_Mins'

要创建某个特征的分布图,将其作为参数传给 sns.distplot()。Telco 数据集已作为名为 telco 的 DataFrame 提供给您。

本练习是课程的一部分

营销分析:用 Python 预测客户流失

查看课程

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Import matplotlib and seaborn
import matplotlib.pyplot as plt
import seaborn as sns

# Visualize the distribution of 'Day_Mins'


# Display the plot
plt.show()
编辑并运行代码