1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/数据选取 [select-data].html
2023-12-09 18:53:53 +08:00

39 lines
922 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<pre>
DataFrame students
+-------------+--------+
| Column Name | Type |
+-------------+--------+
| student_id | int |
| name | object |
| age | int |
+-------------+--------+
</pre>
<p>编写一个解决方案,选择&nbsp;<code>student_id = 101</code>&nbsp;的学生的 name 和 age 并输出。</p>
<p>返回结果格式如下示例所示。</p>
<p>&nbsp;</p>
<p><strong>示例 1:</strong></p>
<pre>
<b>输入:</b>
+------------+---------+-----+
| student_id | name | age |
+------------+---------+-----+
| 101 | Ulysses | 13 |
| 53 | William | 10 |
| 128 | Henry | 6 |
| 3 | Henry | 11 |
+------------+---------+-----+
<b>输出:</b>
+---------+-----+
| name | age |
+---------+-----+
| Ulysses | 13 |
+---------+-----+
<strong>解释:
</strong>学生 Ulysses 的 student_id = 101所以我们输出了他的 name 和 age。</pre>