Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- #위도#경도#비정형데이터#크롤링
- #크롤링 #웹문서
- 파이썬
- 숫자빼고 중복되는 코드동작법
- 웹매크로 #세잔느
- 셀레니움
- #비정형 데이터 #네이버 #지도 #크롤링
- #비정형#카카오api#api#크롤링
- 코딩
- 웹크롤링
- #K-means #Clustering
- 파이썬 셀레니움
- 카카오APi
- 구글 지오코드
- 위도경도
Archives
- Today
- Total
지방이의 Data Science Lab
[R] 계절컬럼 파생변수 추가 본문
library(stringr)
temp1$month = str_sub(temp1$yearmonth,5,6)
temp1$month = as.numeric(temp1$month)
seasons = function(x){
if(x %in% 2:4) return('Spring')
if(x %in% 5:7) return('Summer')
if(x %in% 8:10) return('Fall')
if(x %in% c(11,12,1)) return('Winter')
}
temp1$season = sapply(temp1$month, seasons)
'Data Analysis > 깨R지식' 카테고리의 다른 글
[R] 날짜 열로 할 수 있는 컬럼관리 방법 (0) | 2019.12.28 |
---|---|
[R] get_dummies와 같은 형태 (0) | 2019.12.28 |
[R] 평균값으로 imputation하는 방법 (0) | 2019.07.25 |
[R] 특정 고객 데이터 추출 (0) | 2019.06.25 |
R: package 직접 설치 (0) | 2019.05.02 |
Comments