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/originData/select-data.json
2023-12-09 19:57:46 +08:00

59 lines
3.7 KiB
JSON

{
"data": {
"question": {
"questionId": "3074",
"questionFrontendId": "2880",
"boundTopicId": null,
"title": "Select Data",
"titleSlug": "select-data",
"content": "<pre>\nDataFrame students\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 select the name and age of the student with <code>student_id = 101</code>.</p>\n\n<p>The result format is in the following example.</p>\n\n<p>&nbsp;</p>\n<pre>\n<strong>Example 1:\nInput:</strong>\n+------------+---------+-----+\n| student_id | name | age |\n+------------+---------+-----+\n| 101 | Ulysses | 13 |\n| 53 | William | 10 |\n| 128 | Henry | 6 |\n| 3 | Henry | 11 |\n+------------+---------+-----+\n<strong>Output:</strong>\n+---------+-----+\n| name | age | \n+---------+-----+\n| Ulysses | 13 |\n+---------+-----+\n<strong>Explanation:\n</strong>Student Ulysses has student_id = 101, we select the name and age.</pre>\n",
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 33,
"dislikes": 3,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"students\":[\"student_id\",\"name\",\"age\"]},\"rows\":{\"students\":[[101,\"Ulysses\",13],[53,\"William\",10],[128,\"Henry\",6],[3,\"Henry\",11]]}}",
"categoryTitle": "pandas",
"contributors": [],
"topicTags": [],
"companyTagStats": null,
"codeSnippets": [
{
"lang": "Pandas",
"langSlug": "pythondata",
"code": "import pandas as pd\n\ndef selectData(students: pd.DataFrame) -> pd.DataFrame:\n ",
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"12.7K\", \"totalSubmission\": \"16.6K\", \"totalAcceptedRaw\": 12732, \"totalSubmissionRaw\": 16615, \"acRate\": \"76.6%\"}",
"hints": [
"Consider applying both row and column filtering to select the desired data."
],
"solution": {
"id": "2107",
"canSeeDetail": true,
"paidOnly": false,
"hasVideoSolution": false,
"paidOnlyVideo": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "{\"headers\":{\"students\":[\"student_id\",\"name\",\"age\"]},\"rows\":{\"students\":[[101,\"Ulysses\",13],[53,\"William\",10],[128,\"Henry\",6],[3,\"Henry\",11]]}}",
"metaData": "{\n \"pythondata\": [\n \"students = pd.DataFrame([], columns=['student_id', 'name', 'age']).astype({'student_id':'Int64', 'name':'object', 'age':'Int64'})\"\n ],\n \"database\": true,\n \"name\": \"selectData\",\n \"languages\": [\n \"pythondata\"\n ]\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"pythondata\": [\"Pandas\", \"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}