Python 3.7.6
Pandas 1.0.1
Pandas 라이브러리에서 file 불러오기 및 저장하기
불러오기 : pandas.read_csv()
저장하기 : .to_csv()
import pandas as pd
f = pd.read_csv('path\to\file.csv') # encoding = 'cp949', delimiter = '|' or '\t'
f.head() # or f.tail()
f.to_csv('newfile.csv') # encoding = 'utf-8'
'Python' 카테고리의 다른 글
[Python] for문으로 변수 여러 개 생성 (2) | 2022.10.31 |
---|---|
[Python] venv으로 가상환경 만들기 (0) | 2022.09.27 |
[Python] 오프라인환경에서 라이브러리 설치 (0) | 2021.10.28 |
[Python] timedelta to int/ timedelta to seconds (0) | 2021.07.13 |
[Python][anaconda] 가상환경 만들기 conda create -n (0) | 2021.07.13 |