## 특정 일자의 주차를 알고 싶을 때,
## isocalendar 가 튜플 타입으로 반환하며, 년, 주
datetime.date(2019,12,31).isocalendar()[0]
datetime.date(2019,12,31).isocalendar()[1]
'언어 꿀Tip > Python 꿀tip!' 카테고리의 다른 글
07_01_31. 데이터프레임 groupby 계산시 컬럼명(column) 변경 (0) | 2021.04.12 |
---|---|
07_01_30. convert multi index to single index (Series) (0) | 2021.04.12 |
07_01_28. 오른쪽 특정 문자 삭제하기 (0) | 2021.04.09 |
07_01_27. groupby rolling sum & Series name 변경 (0) | 2021.04.09 |
07_01_26. date_range 연속적인 날짜 생성 (0) | 2021.04.07 |