選取欄位的兩種方法
我們再次把四位嫌疑人的信用卡紀錄載入到名為 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)