題目會給定一個pandas DataFrame作為輸入,要求我們回傳student_id為101的這筆資料,並且列出它的"name"和"age"欄位。
Example 1:
Input:
+------------+---------+-----+
| student_id | name | age |
+------------+---------+-----+
| 101 | Ulysses | 13 |
| 53 | William | 10 |
| 128 | Henry | 6 |
| 3 | Henry | 11 |
+------------+---------+-----+
Output:
+---------+-----+
| name | age |
+---------+-----+
| Ulysses | 13 |
+---------+-----+
Explanation:
Student Ulysses has student_id = 101, we select the name and age.
回傳student_id為101這筆資料的 name 和 age 欄位
使用經典的pandas dataframe檢索語法
df[ 條件判斷式 ][ [...希望取得的欄位名稱...] ]