我读了很多关于这方面的文章,但我仍然不能确定并找到一个对所有人都有用的答案,特别是关于Python2.7中熊猫行为的问题。在
在Pandas、python2.7中用str或Unicode“重铸”更好吗?
(选项1或选项2)
选项1:
df = pd.DataFrame({'b':['ホテ','・旅館', 'ホテル']})
df= df.astype({ 'b': 'unicode'})
选项2:
^{pr2}$
根据引用,在进行任何处理之前,所有内容都应该以Unicode格式输入?在
参考文献:
Python str vs unicode types
Tags:
目前没有回答
相关问题 更多 >
编程相关推荐