반응형
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 |
Tags
- GIT
- Excel
- Kotlin
- math
- PANDAS
- string
- Java
- Mac
- numpy
- SQL
- Redshift
- django
- google apps script
- matplotlib
- c#
- Python
- PostgreSQL
- 파이썬
- PySpark
- hive
- Github
- Tkinter
- dataframe
- list
- Google Spreadsheet
- array
- Apache
- gas
- Google Excel
Archives
- Today
- Total
목록encoding error (1)
달나라 노트
Python Pandas : UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte (read_csv 에러, read_csv error, encoding error)
간혹 read_csv method로 csv 파일을 읽을 때 아래와 같은 error가 발생하는 경우가 있습니다. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte encoding관련 문제가 생겨서 발생하는 error인데 이러한 error가 발생하면 먼저 원본 csv 파일에 한글이 섞여있는지 확인해보면 좋습니다. import pandas as pd df_test = pd.read_csv('test.csv', sep=',', encoding='euc-kr') df_test = pd.read_csv('test.csv', sep=',', encoding='cp949') 만약 한글이 포함되어있다면 위처럼..
Python/Python Pandas
2022. 2. 11. 01:49