Path: csiph.com!news.swapon.de!newsreader4.netcologne.de!news.netcologne.de!feeder1.xsusenet.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'encoded': 0.05; "subject:' ": 0.07; 'subject:file': 0.07; 'utf-8': 0.07; 'csv': 0.09; 'subject:CSV': 0.09; 'assume': 0.11; 'codec': 0.16; 'decode': 0.16; 'encoded.': 0.16; 'from:addr:xs4all.nl': 0.16; 'received:194.109': 0.16; 'received:194.109.24': 0.16; 'received:xs4all.nl': 0.16; 'wrote:': 0.16; 'byte': 0.18; 'windows': 0.20; 'cc:2**0': 0.20; 'subject:problem': 0.22; 'this:': 0.23; 'cc:addr:gmail.com': 0.24; 'header:In-Reply-To:1': 0.24; 'skip:" 20': 0.26; 'skip:( 20': 0.28; 'guess': 0.31; "can't": 0.32; 'file': 0.34; 'skip:p 30': 0.35; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'skip:p 20': 0.38; 'skip:e 20': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'skip:u 10': 0.61; 'header:Message-Id:1': 0.61; 'greetings,': 0.61; 'received:194': 0.61; 'received:nl': 0.72 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: Pandas' loading a CSV file problem From: Michiel Overtoom In-Reply-To: Date: Thu, 22 Oct 2015 15:23:27 +0200 Cc: Ek Esawi Content-Transfer-Encoding: quoted-printable References: To: Pyton List X-Mailer: Apple Mail (2.2104) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1445520278 news.xs4all.nl 23829 [2001:888:2000:d::a6]:40544 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:97903 Hi Ek, > On 22 Oct 2015, at 14:44, Ek Esawi wrote: >=20 > f =3D pd.read_csv('c:/Users/EK Esawi/My Documents/Temp/GOSATemp1.csv') > File "pandas\parser.pyx", line 1382, in pandas.parser._string_box_utf8 = (pandas\parser.c:17655) > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb1 in position = 8: invalid start byte I guess you're on Windows and your CSV file is encoded as Windows-1252. = Unless you tell Pandas this it'll assume your file is utf-8 encoded. Try this: f =3D pd.read_csv('c:/Users/EK Esawi/My = Documents/Temp/GOSATemp1.csv', encoding=3D'windows-1252') Greetings,