본문 바로가기

susinlee 님의 블로그

검색하기
susinlee 님의 블로그
프로필사진 susinlee

  • 분류 전체보기 (319) N
    • TIL (97) N
      • TIL (97) N
    • 프로젝트 (2)
      • 팀 프로젝트 (1)
      • 개인 프로젝트 (1)
    • 코드카타 (186)
      • SQL, Pandas (139)
      • Python (47)
    • 학습 (100)
      • 머신러닝 (6)
      • 통계학 (6)
    • 일상 (22)
      • 요리 (14)
      • 운동 (8)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/02   »
일 월 화 수 목 금 토
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
Tags
  • 내용이 정확하지 않음
  • 텐초의 파이토치 딥러닝 특강
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록2025/02/10 (1)

susinlee 님의 블로그

117. Friend Requests II: Who Has the Most Friends

[문제]https://leetcode.com/problems/friend-requests-ii-who-has-the-most-friends/description/ [풀이]1. requester_id 열과 accepter_id 열을 위 아래로 합쳐준다.2. 합친 열을 그룹화하고 개수를 센다음 정렬한 뒤 제일 첫 번째 행을 가져온다. Pandasimport pandas as pddef most_friends(request_accepted: pd.DataFrame) -> pd.DataFrame: df = pd.DataFrame({ 'id': pd.concat([request_accepted['requester_id'], request_accepted['accepter_id']]) }) ..

코드카타/SQL, Pandas 2025. 2. 10. 09:32
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바