pd.to_datetime(tmp_df['oper_dt'], format='%Y%m%d').apply(lambda x: x.isocalendar()[0])
pd.to_datetime(tmp_df['oper_dt'], format='%Y%m%d').apply(lambda x: str(x.isocalendar()[0])+'W'+str(x.isocalendar()[1]))
'언어 꿀Tip > Python 꿀tip!' 카테고리의 다른 글
07_01_19. sql in 조건 넣을 때, list 형식에서 [] 없애기 (0) | 2021.03.25 |
---|---|
07_01_18. [AWS] plot에 한글폰트 추가하기 (0) | 2021.03.25 |
07_01_15. pandas sql (데이터프레임) (0) | 2021.03.24 |
07_01_16. multi index filtering (0) | 2021.03.16 |
07_01_14. 데이터 프레임에서 특정 값을 포함한 컬럼명 filter (0) | 2021.03.10 |