Feature Engineering

seongyong·2021년 3월 5일
0

보충 학습내용

import warnings
warnings.filterwarnings("ignore") #warning 제거

import os

os.getcwd() #현재 디렉토리 확인
os.listdir() #디렉토리의 파일확인
os.chdir(' ') #디렉토리 이동
os.chdir('..') #상위 디렉토리로 이동

import matplotlib

matplotlib.rcParams['lines.linewidth'] = 2
matplotlib.rc('lines', linewidth=2, color ='r') #한꺼번에 설정 가능

학습내용

Feature engineering

Feature engineering : extracting useful feature from raw data

  • domain knowledge
  • visualization
  • math/statistics
    ex.
    outlier
    missing value
    one hot encoding

tidy

  • 각 변수는 개별의 column으로 존재
  • 각 관측치는 row를 구성
  • 각 표는 단 하나의 관측기준에 의해서 조직된 데이터를 저장
  • 만약 여러개의 표가 존재한다면, 적어도 하나이상의 열(column)이 공유되어야 함
NaN : 실수형
Na, Null, NaN, 0, Undefined 차이?
-> 파이썬에서는 차이를 두지 않고 정해지지않은 값이라는 의미로 넘파이의 NaN을 사용.

type, dtype 차이 : type은 자료구조, dtype은 특정 데이터들의 형태

"".join(list)
replace
split
try, except

SyntaxError: unexpected EOF while parsing
-> pass로 해결가능 #작업이 이루어지지 않더라도 통과

pd.to_numeric
df.astype({
		})

0개의 댓글