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 | 29 | 30 | 31 |
Tags
- pandas
- data
- hierarchical_clustering
- list
- insert()
- 최솟값
- 반복문
- wcss
- count()
- Machine Learning
- len()
- dendrogram
- string
- matplotlib
- sklearn
- 덴드로그램
- DataFrame
- del
- analizer
- Dictionary
- elbow method
- 분류 결과표
- numpy
- IN
- function
- 최댓값
- Python
- nan
- DataAccess
- append()
Archives
- Today
- Total
개발공부
파이썬으로 압축파일 푸는 방법 본문
파이썬에서 압축파일을 푸는 코드는 아래와 같다.
import zipfile
zip_ref = zipfile.ZipFile('압축파일경로')
zip_ref.extractall('압축을 풀 경로')
zip_ref.close()
예제
tmp폴더의 horse-or-human.zip 파일의 압축을 풀어
tmp폴더에 horse-or-human 폴더를 생성한 후 저장하기
import zipfile
zip_ref = zipfile.ZipFile('/tmp/horse-or-human.zip')
zip_ref.extractall('/tmp/horse-or-human')
zip_ref.close()
'Python > Basic' 카테고리의 다른 글
| 파이썬 환경에서 MySQL 연결하는 법, 예제 (0) | 2022.06.17 |
|---|---|
| [Python] 구글 맵(google maps) API - Geocoding API 설정하는 방법 (0) | 2022.05.04 |
| [Python] relativedelta를 이용해 날짜 연산하기 (0) | 2022.04.27 |
| [Python] parse, 문자열 날짜를 datetime으로 변경 (0) | 2022.04.27 |
| [Python] time 모듈을 이용한 UTC시간, Local 시간 (0) | 2022.04.27 |