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
- 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 257ms, memory 66.3MB, accepted 2026-01-02.
import pandas as pd
def getDataframeSize(players: pd.DataFrame) -> List[int]:
return list(players.shape)