I want to print one table from one Chinese website I use python3 on mac, my program is :
import pandas as pd fiddy_states = pd.read_html(‘http://baike.baidu.com/link?url=egtq5T9VHlXrxzdeXhVZZWY3NBnz4Njf_Glbb4fXm7o96R-spULpI6MOmaLibK4D-uTxG3h8Da6nxuZnKFF2lD3oGkWi4JXGZxScOKr_tWe’) print(fiddy_states[0])
first time,I use sublime text and it told me the following error:
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 14-16
but when I tried on python IDLE, there is no error on my program .
so the problem must come from sublime text, someone suggest amend the build system with
“env”: {“PYTHONIOENCODING”: “utf8”}
but I can’t change the build, sublime don’t let me to run the program, even to save it:
