LeetCode solutions

3076. Get the Size of a DataFrame

My accepted Python solution to LeetCode problem 3076, Get the Size of a DataFrame, running in 257ms.

  • Difficulty: Easy
  • Python
  • Runtime 257ms
  • Memory 66.3MB

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 257ms, memory 66.3MB, accepted 2026-01-02.

python
import pandas as pd

def getDataframeSize(players: pd.DataFrame) -> List[int]:
    return list(players.shape)

Source