題目會給定一個python list形式的輸入,要求我們把它轉換成pandas dataframe的形式做輸出。並且指定column名稱分別為student_id, 和 age
Example 1:
Input:
student_data:
[
[1, 15],
[2, 11],
[3, 11],
[4, 20]
]
Output:
+------------+-----+
| student_id | age |
+------------+-----+
| 1 | 15 |
| 2 | 11 |
| 3 | 11 |
| 4 | 20 |
+------------+-----+
Explanation:
A DataFrame was created on top of student_data, with two columns named student_id and age.