探索数据
到目前为止做得很好!现在您已经掌握了用于探索和准备监督学习模型数据集的关键技巧。接下来请动手检验您的所学。在本练习中,您将探索电信客户流失数据集的关键特征。提交前请分别运行每一行代码,这样您可以获取有关数据集的关键信息。pandas 模块已作为 pd 为您加载。
原始的电信流失数据集 telco_raw 已作为 pandas DataFrame 为您加载。您可以在控制台中对其进行探索,先熟悉一下该数据集。
本练习是课程的一部分
Python 营销中的机器学习
练习说明
- 打印
telco_raw的数据类型。 - 打印
telco_raw的表头。 - 打印
telco_raw各列的唯一值数量。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Print the data types of telco_raw dataset
print(telco_raw.___)
# Print the header of telco_raw dataset
print(telco_raw.___())
# Print the number of unique values in each telco_raw column
print(telco_raw.___())