LeetCode solutions

3074. Select Data

My accepted Python solution to LeetCode problem 3074, Select Data, running in 343ms.

  • Difficulty: Easy
  • Python
  • Runtime 343ms
  • Memory 66.9MB

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 343ms, memory 66.9MB, accepted 2026-01-02.

python
import pandas as pd

def selectData(students: pd.DataFrame) -> pd.DataFrame:
    return students[students['student_id'] == 101][['name', 'age']]

Source