开始使用免费开始使用

计算变量的统计量

我们已为您创建了一个 pandasDataFrame,名为 data,其中包含 3 个变量:var1var2var3

现在请计算这些变量的平均值和标准差,并打印数据集的关键统计信息。

您可以使用控制台来探索该数据集。

本练习是课程的一部分

Python 中的客户细分

查看课程

练习说明

  • 打印数据集中各变量的平均值。
  • 打印数据集中各变量的标准差。
  • 输出该数据集的关键统计信息。

交互式实操练习

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

# Print the average values of the variables in the dataset
print(____.____())

# Print the standard deviation of the variables in the dataset
print(____.____())

# Get the key statistics of the dataset
print(____.____())
编辑并运行代码