Skip to content

Commit 39554f2

Browse files
authored
Update famafrench.py
This change allows the `pandas_datareader` library to read Windows text files with smart quotes and apostrophes and still convert all other characters to UTF-8, where needed.
1 parent 90f155a commit 39554f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas_datareader/famafrench.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def _read_zipfile(self, url):
5858
tmpf.write(raw)
5959

6060
with ZipFile(tmpf, "r") as zf:
61-
data = zf.open(zf.namelist()[0]).read().decode()
61+
data = zf.open(zf.namelist()[0]).read().decode('utf-8','ignore')
62+
6263

6364
return data
6465

0 commit comments

Comments
 (0)