3074. Select Data
My accepted Python solution to LeetCode problem 3074, Select Data, running in 343ms.
- Difficulty: Easy
- Python
- Runtime 343ms
- Memory 66.9MB
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
Python
Accepted on LeetCode — runtime 343ms, memory 66.9MB, accepted 2026-01-02.
import pandas as pd
def selectData(students: pd.DataFrame) -> pd.DataFrame:
return students[students['student_id'] == 101][['name', 'age']]