我想使用 utf-8 打开并读取带有pd.read_excel的 excel 文件(因此可以读取其他语言),因为在read_csv中可以将编码设置为 utf-8,这可能吗?
You may pass an open file:
with open("file_path", encoding="utf-8") as f:
pd.read_excel(f)
I didn't find a reference in the docs but a quick look in pandas code suggests "utf-8" might be the default already.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.