압축파일 푸는 방법
압축파일을 풀기 위해서는 zipfile 라이브러리를 임포트 해준다.
zipfile.ZipFile 을 이용하여서 압축을 풀고자 하는 파일 경로를 작성해준후,
extractall 을 이용하여서 압축 해제한 파일을 저장할 경로를 작성해주면 된다.
import zipfile
file = zipfile.ZipFile('/tmp/horse-or-human.zip')
file.extractall('/tmp/horse-or-human')
'Python' 카테고리의 다른 글
| 상관계수 corr() 에서 min_periods 파라미터 사용법 (0) | 2023.01.03 |
|---|---|
| 특정 컬럼과 전체 컬럼 간의 상관계수, corrwith (0) | 2023.01.03 |
| Python 데이터프레임을 sb.heatmap 으로 나타내기 (0) | 2022.11.30 |
| [pandas] 피봇 테이블 다루기 pivot table (0) | 2022.11.30 |
| [pandas] 판다스에서 datetime 다루기 - Pandas Time Series (0) | 2022.11.30 |