leetcode(28)
-
[LeetCode] Pandas / 2880. Select Data
문제 링크https://leetcode.com/problems/select-data/description/ 문제 코드import pandas as pddef selectData(students: pd.DataFrame) -> pd.DataFrame: return students[students.student_id == 101][["name", "age"]]
2024.07.08 -
[LeetCode] Pandas / 2879. Display the first three rows
문제 링크https://leetcode.com/problems/display-the-first-three-rows/description/ 문제 코드import pandas as pddef selectFirstRows(employees: pd.DataFrame) -> pd.DataFrame: return employees.head(3)
2024.07.08 -
[LeetCode] Pandas / 2878. Get the size of a DataFrame
문제 링크https://leetcode.com/problems/get-the-size-of-a-dataframe/ 문제 코드import pandas as pddef getDataframeSize(players: pd.DataFrame) -> List[int]: return [players.shape[0], players.shape[1]]
2024.07.08 -
[LeetCode] Pandas / 2877. Create a DataFrame from List
문제 링크https://leetcode.com/problems/create-a-dataframe-from-list/description/ 문제 코드import pandas as pddef createDataframe(student_data: List[List[int]]) -> pd.DataFrame: return pd.DataFrame(student_data, columns=['student_id', 'age'])
2024.07.08 -
[LeetCode] SQL 50 / MySQL / 1934. Confirmation Rate
문제 링크 https://leetcode.com/problems/confirmation-rate/description/?envType=study-plan-v2&envId=top-sql-50 Confirmation Rate - LeetCode Can you solve this real interview question? Confirmation Rate - Table: Signups +----------------+----------+ | Column Name | Type | +----------------+----------+ | user_id | int | | time_stamp | datetime | +----------------+----------+ user_id is the colum leetco..
2024.01.06 -
[LeetCode] SQL 50 / MySQL / 570. Managers with at Least 5 Direct Reports
문제 링크 https://leetcode.com/problems/managers-with-at-least-5-direct-reports/description/?envType=study-plan-v2&envId=top-sql-50 Managers with at Least 5 Direct Reports - LeetCode Can you solve this real interview question? Managers with at Least 5 Direct Reports - Table: Employee +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | | departme..
2024.01.06