pandas 保存时特殊字符转换为怪异字符

pandas special chars converted to weird chars when saving

我有一系列的文字:

s = ["t1" , "t1", "it wasn’t that simple"]

保存为 csv 时:

s.to_csv("s.csv")

然后在excel中打开,字符'变为如下:

"it wasn’t that simple"

如何修复?

使用encoding='utf-16'

例如:

s = ["t1" , "t1", "it wasn’t that simple"]  
s = pd.Series(s)
s.to_csv(filename, encoding='utf-16', index=False)