빅데이터분석기사 실기
[010] datatime category - dtype 변경
M1RA
2022. 6. 9. 16:42
1. datetime, category 타입변경
- pd.to_datetime(Series, format='형식')
%Y : 4글자 년도, %y : 2글자 년도, %m : 2글자 월, %d : 2글자 일
다양한 형식 문자들 : https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior
format의 지정이 필수는 아님
- pd.Categorical(Series, categories=['범주1', '범주2', ...], ordered=None)
ordered=True 사용 시 순서있는 범주형, 정렬시 정해진 순서가 사용됨
categories, ordered의 지정이 필수는 아님
<출처>
인프런 - [EduAtoZ] 빅데이터분석기사 실기 대비 Part2. datatime category의 dtype 변경