选择列的两种方法
我们再次将四名嫌疑人的信用卡记录加载到了名为 credit_records 的 DataFrame 中。让我们查看他们购买了哪些商品。
pandas 模块已使用别名 pd 导入。
DataFrame credit_records 已经导入。
本练习是课程的一部分
Python 数据科学入门
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Select the column item from credit_records
# Use brackets and string notation
items = ____
# Display the results
print(items)