mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 16:01:41 +08:00
update
This commit is contained in:
36
leetcode/problem/select-data.html
Normal file
36
leetcode/problem/select-data.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<pre>
|
||||
DataFrame students
|
||||
+-------------+--------+
|
||||
| Column Name | Type |
|
||||
+-------------+--------+
|
||||
| student_id | int |
|
||||
| name | object |
|
||||
| age | int |
|
||||
+-------------+--------+
|
||||
|
||||
</pre>
|
||||
|
||||
<p>Write a solution to select the name and age of the student with <code>student_id = 101</code>.</p>
|
||||
|
||||
<p>The result format is in the following example.</p>
|
||||
|
||||
<p> </p>
|
||||
<pre>
|
||||
<strong>Example 1:
|
||||
Input:</strong>
|
||||
+------------+---------+-----+
|
||||
| student_id | name | age |
|
||||
+------------+---------+-----+
|
||||
| 101 | Ulysses | 13 |
|
||||
| 53 | William | 10 |
|
||||
| 128 | Henry | 6 |
|
||||
| 3 | Henry | 11 |
|
||||
+------------+---------+-----+
|
||||
<strong>Output:</strong>
|
||||
+---------+-----+
|
||||
| name | age |
|
||||
+---------+-----+
|
||||
| Ulysses | 13 |
|
||||
+---------+-----+
|
||||
<strong>Explanation:
|
||||
</strong>Student Ulysses has student_id = 101, we select the name and age.</pre>
|
Reference in New Issue
Block a user