Section1 - Note 02 Feature Engineering

‍Juhee Kim·2021년 4월 1일
1

Feature Engineering

도메인 지식과 창의성을 바탕으로, 데이터셋에 존재하는 Feature들을 재조합하여 새로운 Feature를 만드는 것

ex. 비만도 계산

Dataframe

테이블 형식의 2차원 프레임

replace

string.replace('oldvalue', 'newvalue', count)

apply

함수 선언 후 column에 적용

# 입력된 문자열에 대해서 같은 작업을 하는 함수 작성
def toInt(string):
    return int(string.replace(',',''))

#column 에 함수 적용
df['정수로'] = df['소숫점둘째'].apply(toInt)
profile
찐문과생의 빅데이터 생존기🐣 열심히 할래용 (ง •_•)ง

0개의 댓글