开始使用免费开始使用

选择走失的小狗

回到装载为 mpr 的走失小狗 DataFrame。请选择几行数据,进一步了解其它走失的狗狗。

本练习是课程的一部分

Python 数据科学入门

查看课程

练习说明

  • 选择 Age 大于 2 的狗。
  • 选择 Status 等于 Still Missing 的狗。
  • 选择 Dog Breed 不等于 Poodle 的所有狗。

交互式实操练习

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

# Select the dogs where Age is greater than 2
greater_than_2 = mpr[mpr.Age ____ 2]
print(greater_than_2)

# Select the dogs whose Status is equal to Still Missing
still_missing = mpr[____ ____ ____]
print(still_missing)

# Select all dogs whose Dog Breed is not equal to Poodle
not_poodle = ____
print(not_poodle)
编辑并运行代码