0
如何將Unicode轉換爲字符串?在Python中轉換爲Unicode
df = pd.DataFrame ({'A':[u'Joe', u'Bill']})
test = df['A'] == 'Joe'
這適用於全列轉換爲Unicode到彩車:
df['B'] = df['B'].astype(float)
但是當我嘗試:
df['A'] = df['A'].astype(str)
輸出是:
0 J
1 B
Unicode字符串是字符串。他們是否對您造成問題? – Blender 2013-05-05 19:22:34