1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-07 16:31:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -2,14 +2,14 @@
"data": {
"question": {
"questionId": "3064",
"questionFrontendId": "100005",
"categoryTitle": "Algorithms",
"questionFrontendId": "2888",
"categoryTitle": "pandas",
"boundTopicId": 2453767,
"title": "Reshape Data: Concatenate",
"titleSlug": "reshape-data-concatenate",
"content": "<pre>\nDataFrame <code>df1</code>\n+-------------+--------+\n| Column Name | Type |\n+-------------+--------+\n| student_id | int |\n| name | object |\n| age | int |\n+-------------+--------+\n\nDataFrame <code>df2</code>\n+-------------+--------+\n| Column Name | Type |\n+-------------+--------+\n| student_id | int |\n| name | object |\n| age | int |\n+-------------+--------+\n\n</pre>\n\n<p>Write a solution to concatenate these two DataFrames <strong>vertically</strong> into one DataFrame.</p>\n\n<p>The result format is in the following example.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:\ndf1</strong>\n+------------+---------+-----+\n| student_id | name | age |\n+------------+---------+-----+\n| 1 | Mason | 8 |\n| 2 | Ava | 6 |\n| 3 | Taylor | 15 |\n| 4 | Georgia | 17 |\n+------------+---------+-----+\n<strong>df2\n</strong>+------------+------+-----+\n| student_id | name | age |\n+------------+------+-----+\n| 5 | Leo | 7 |\n| 6 | Alex | 7 |\n+------------+------+-----+\n<strong>Output:</strong>\n+------------+---------+-----+\n| student_id | name | age |\n+------------+---------+-----+\n| 1 | Mason | 8 |\n| 2 | Ava | 6 |\n| 3 | Taylor | 15 |\n| 4 | Georgia | 17 |\n| 5 | Leo | 7 |\n| 6 | Alex | 7 |\n+------------+---------+-----+\n<strong>Explanation:\n</strong>The two DataFramess are stacked vertically, and their rows are combined.</pre>\n",
"translatedTitle": null,
"translatedContent": null,
"translatedTitle": "重塑数据:连结",
"translatedContent": "<pre>\nDataFrame <code>df1</code>\n+-------------+--------+\n| Column Name | Type |\n+-------------+--------+\n| student_id | int |\n| name | object |\n| age | int |\n+-------------+--------+\n\nDataFrame <code>df2</code>\n+-------------+--------+\n| Column Name | Type |\n+-------------+--------+\n| student_id | int |\n| name | object |\n| age | int |\n+-------------+--------+\n\n</pre>\n\n<p>编写一个解决方案,将两个&nbsp;DataFrames <b>垂直 </b>连接成一个&nbsp;DataFrame。</p>\n\n<p>结果格式如下示例所示。</p>\n\n<p>&nbsp;</p>\n\n<p><strong class=\"example\">示例 1</strong></p>\n\n<pre>\n<strong>输入:\ndf1</strong>\n+------------+---------+-----+\n| student_id | name | age |\n+------------+---------+-----+\n| 1 | Mason | 8 |\n| 2 | Ava | 6 |\n| 3 | Taylor | 15 |\n| 4 | Georgia | 17 |\n+------------+---------+-----+\n<strong>df2\n</strong>+------------+------+-----+\n| student_id | name | age |\n+------------+------+-----+\n| 5 | Leo | 7 |\n| 6 | Alex | 7 |\n+------------+------+-----+\n<b>输出:</b>\n+------------+---------+-----+\n| student_id | name | age |\n+------------+---------+-----+\n| 1 | Mason | 8 |\n| 2 | Ava | 6 |\n| 3 | Taylor | 15 |\n| 4 | Georgia | 17 |\n| 5 | Leo | 7 |\n| 6 | Alex | 7 |\n+------------+---------+-----+\n<strong>解释:\n</strong>两个 DataFrame 被垂直堆叠,它们的行被合并。</pre>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 0,
@@ -28,7 +28,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"12\", \"totalSubmission\": \"12\", \"totalAcceptedRaw\": 12, \"totalSubmissionRaw\": 12, \"acRate\": \"100.0%\"}",
"stats": "{\"totalAccepted\": \"1.3K\", \"totalSubmission\": \"1.5K\", \"totalAcceptedRaw\": 1315, \"totalSubmissionRaw\": 1522, \"acRate\": \"86.4%\"}",
"hints": [
"Consider using a built-in function in pandas library with the appropriate axis argument."
],