mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 00:11:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
"question": {
|
||||
"questionId": "3065",
|
||||
"questionFrontendId": "2879",
|
||||
"categoryTitle": "Algorithms",
|
||||
"categoryTitle": "pandas",
|
||||
"boundTopicId": 2467489,
|
||||
"title": "Display the First Three Rows",
|
||||
"titleSlug": "display-the-first-three-rows",
|
||||
"content": "<pre>\nDataFrame: <code>employees</code>\n+-------------+--------+\n| Column Name | Type |\n+-------------+--------+\n| employee_id | int |\n| name | object |\n| department | object |\n| salary | int |\n+-------------+--------+\n</pre>\n\n<p>Write a solution to display the <strong>first <code>3</code> </strong>rows<strong> </strong>of this DataFrame.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:\n</strong>DataFrame employees\n+-------------+-----------+-----------------------+--------+\n| employee_id | name | department | salary |\n+-------------+-----------+-----------------------+--------+\n| 3 | Bob | Operations | 48675 |\n| 90 | Alice | Sales | 11096 |\n| 9 | Tatiana | Engineering | 33805 |\n| 60 | Annabelle | InformationTechnology | 37678 |\n| 49 | Jonathan | HumanResources | 23793 |\n| 43 | Khaled | Administration | 40454 |\n+-------------+-----------+-----------------------+--------+\n<strong>Output:</strong>\n+-------------+---------+-------------+--------+\n| employee_id | name | department | salary |\n+-------------+---------+-------------+--------+\n| 3 | Bob | Operations | 48675 |\n| 90 | Alice | Sales | 11096 |\n| 9 | Tatiana | Engineering | 33805 |\n+-------------+---------+-------------+--------+\n<strong>Explanation:</strong> \nOnly the first 3 rows are displayed.</pre>\n",
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"translatedTitle": "显示前三行",
|
||||
"translatedContent": "<pre>\nDataFrame: <code>employees</code>\n+-------------+--------+\n| Column Name | Type |\n+-------------+--------+\n| employee_id | int |\n| name | object |\n| department | object |\n| salary | int |\n+-------------+--------+\n</pre>\n\n<p>编写一个解决方案,显示这个 DataFrame 的<strong> 前 <code>3</code> </strong>行。</p>\n\n<p> </p>\n\n<p><b>示例 1:</b></p>\n\n<pre>\n<strong>输入:\n</strong>DataFrame employees\n+-------------+-----------+-----------------------+--------+\n| employee_id | name | department | salary |\n+-------------+-----------+-----------------------+--------+\n| 3 | Bob | Operations | 48675 |\n| 90 | Alice | Sales | 11096 |\n| 9 | Tatiana | Engineering | 33805 |\n| 60 | Annabelle | InformationTechnology | 37678 |\n| 49 | Jonathan | HumanResources | 23793 |\n| 43 | Khaled | Administration | 40454 |\n+-------------+-----------+-----------------------+--------+\n<b>输出:</b>\n+-------------+---------+-------------+--------+\n| employee_id | name | department | salary |\n+-------------+---------+-------------+--------+\n| 3 | Bob | Operations | 48675 |\n| 90 | Alice | Sales | 11096 |\n| 9 | Tatiana | Engineering | 33805 |\n+-------------+---------+-------------+--------+\n<b>解释:</b>\n只有前 3 行被显示。</pre>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 0,
|
||||
"likes": 1,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -28,7 +28,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"18\", \"totalSubmission\": \"18\", \"totalAcceptedRaw\": 18, \"totalSubmissionRaw\": 18, \"acRate\": \"100.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"2.1K\", \"totalSubmission\": \"2.3K\", \"totalAcceptedRaw\": 2130, \"totalSubmissionRaw\": 2307, \"acRate\": \"92.3%\"}",
|
||||
"hints": [
|
||||
"Consider using a built-in function in pandas library to retrieve the initial rows."
|
||||
],
|
||||
|
Reference in New Issue
Block a user