Skip to Main Content
파이썬 데이터 분석 입문: 엑셀 및 CSV 파일 처리부터 데이터베이스, 시각화, 통계분석, 자동화까지
book

파이썬 데이터 분석 입문: 엑셀 및 CSV 파일 처리부터 데이터베이스, 시각화, 통계분석, 자동화까지

by 한창진, 이병욱, 클린턴 브라운리
November 2017
Beginner to intermediate content levelBeginner to intermediate
368 pages
7h 48m
Korean
Hanbit Media, Inc.
Content preview from 파이썬 데이터 분석 입문: 엑셀 및 CSV 파일 처리부터 데이터베이스, 시각화, 통계분석, 자동화까지
62
파이썬 데이터 분석 입문
#
날짜
문자열로부터
특정
형식의
datetime
객체를
생성하기
date1 = today.strftime('%m/%d/%Y')
date2 = today.strftime('%b %d, %Y')
date3 = today.strftime('%Y-%m-%d')
date4 = today.strftime('%B %d, %Y')
#
다른
date
형식을
지닌
4
가지
문자열에
기반한
#
각각
2
종류의
datetime
객체들과
date
객체들
print("Output #54: {!s}".format(datetime.strptime(date1, '%m/%d/%Y')))
print("Output #55: {!s}".format(datetime.strptime(date2, '%b %d, %Y')))
#
날짜
부분만
출력하기
print("Output #56: {!s}".format(datetime.date(datetime.strptime(date3, '%Y-%m-%d'))))
print("Output #57: {!s}".format(datetime.date(datetime.strptime(date4, '%B %d, %Y'))))
이 예제는
strptime
함수를 이용하여 특정 형식을 지닌 날짜 문자열로부터
datetime
객체를
생성하는 방법을 보여준다. 이 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

BPF로 리눅스 관측 가능성 향상하기: 성능 분석과 네트워킹을 위한 고급 프로그래밍

BPF로 리눅스 관측 가능성 향상하기: 성능 분석과 네트워킹을 위한 고급 프로그래밍

류광, 데이비드 칼라베라, 로렌초 폰타나

Publisher Resources

ISBN: 9791162240144