Feature Engineering_AI_BC_day02

dannialism·2021년 11월 18일
0

내용

Feature engineering is a process of extracting useful features from raw data using math, statisitcs and domain knowledge.

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

6 main data types
bool : a "true" or "false" value. 1,0. on,off.(must be written with capital letters.
char:
string: a string of characters"" text values composed of a sequence of characters.("" = ''둘의 쓰임은 같다.)
int(ineger): number, positive or negative whole numbers without a decimal point.
float: real number with a decimal point.
array:

pandas 데이터 타입
dtype: 설명
int64: 정수형
float64: 실수형
bool: 부울형
datatime64: 날짜표현
category: 카테고리
object: 문자열 or 복합형

사용한 코드

def toInt(string):
return int(string.replace(',',''))
(함수를 만들기.)
df2 = pd.DataFrame({'column':['row1','row2'],
'colum2': ['row1','row2'],})
(데이터 프레임 구축)
.astype(str) : 형식을 string으로 변환.
.astype(int) : int로 변환.
.astype(float) : float로 변환.
.div() : 나누기
.mul() : 곱하기
.round() : 반올림
.replace('어떤 것을','이것으로') : 교체
.to_numeric() : The best way to convert one or more columns of a DataFrame to numeric values.
.apply() : parameter를 해당 column에 모두 적용.
.mean() : 평균값

things to acheive

각 문항 마다 요구하는 스킬셋이 무엇인지 파악한 뒤 집중하여 탐색한다.
for 구문으로 반복 실행하는 코드 작성법을 익혀야한다.
pandas는 파이썬 기반으로 작동되지만 원리는 조금 다르다.
pandas 자체를 이해하는 것도 필요하다.

profile
danny + realism

0개의 댓글