[LeetCode] Pandas / 2878. Get the size of a DataFrame

2024. 7. 8. 14:34Coding/LeetCode-Pandas

문제 링크

https://leetcode.com/problems/get-the-size-of-a-dataframe/

 

문제

 

코드

import pandas as pd

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