1. Learn
  2. /
  3. 课程
  4. /
  5. Python 数据科学入门

Connected

道练习

加载 DataFrame

我们仍在全力侦破金毛寻回犬 Bayes 的绑架案。此前,我们根据案发现场发现的一块车牌,将嫌疑人范围缩小到:

  • Fred Frequentist
  • Ronald Aylmer Fisher
  • Gertrude Cox
  • Kirstine Smith

我们已经拿到了这 4 位嫌疑人的信用卡记录。也许有人在绑架前有可疑消费?

这些记录保存在名为 "credit_records.csv" 的 CSV 文件中。

说明

100 XP
  • 将 pandas 模块以别名 pd 导入。
  • 将 CSV 文件 "credit_records.csv" 加载为名为 credit_records 的 DataFrame。
  • 使用 .head() 方法显示 credit_records 的前 5 行。