개발하는 고양이 호랑이

  • 홈
  • 태그
  • 방명록

pandas 1

Pandas) 두 칼럼 이상 이용하여 함수 apply할 때 간단히 하는 법

이렇게 써도 되는지는 몰랐다 보기 깔끔한 듯! df['col_3'] = df[['col_1','col_2']].apply(lambda x: f(*x), axis=1) 이렇게 쓸줄만 알았었음 df['col_3'] = df.apply(lambda x: f(x['col 1'], x['col 2']), axis=1) * Reference https://stackoverflow.com/questions/13331698/how-to-apply-a-function-to-two-columns-of-pandas-dataframe How to apply a function to two columns of Pandas dataframe Suppose I have a df which has columns of 'ID', 'c..

Data Science 2022.01.25
이전
1
다음
더보기
프로필사진

개발하는 고양이 호랑이

인공지능 어쩌구 개발자

  • 분류 전체보기 (42)
    • IT (11)
    • Data Science (18)
    • NLP (3)
    • 기타 (10)

Tag

NLP, Random Forest Classifier, Effective Python, DL, 코딩셰프, Flutter, mnist, 논문읽기, Python, Kaggle, pycaret, ROC_AUC, pandas, Xgboost, ML, Decision Tree Classifier, 밑바닥부터시작하는딥러닝, word2vec, colab, MobileNet,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/09   »
일 월 화 수 목 금 토
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 29 30

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바