[LeetCode] Pandas / 2879. Display the first three rows

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

문제 링크

https://leetcode.com/problems/display-the-first-three-rows/description/

 

문제

 

코드

import pandas as pd

def selectFirstRows(employees: pd.DataFrame) -> pd.DataFrame:
    return employees.head(3)