Efficiently Determining the Size of a Pandas DataFrame Using .shape
IntuitionWe need to determine the size (number of rows and columns) of a given pandas DataFrame.
Pandas provides a built-in attribute .shape that returns a tupl
# Intuition
We need to determine the size (number of rows and columns) of a given pandas DataFrame.
Pandas provides a built-in attribute .shape that returns a tuple (num_rows, num_columns).
Since the expected output is a list, we convert the tuple to a list.
# Approach
1) Use players.shape to retrieve the DataFrame dimensions.
2) Convert the tuple (rows, columns) → list using list().
3) Return the list [num_rows, num_columns].


 Code
```pythondata []
import pandas as pd

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