Closed ahbon123 closed 3 years ago
请问如何将数据框中某一列的繁体字转化为简体字?我用了df['company'].apply(HanziConv.toSimplified),报错如下:
df['company'].apply(HanziConv.toSimplified)
TypeError: 'float' object is not iterable
Problem solved by df['company'].astype(str).apply(HanziConv.toSimplified)
df['company'].astype(str).apply(HanziConv.toSimplified)
请问如何将数据框中某一列的繁体字转化为简体字?我用了
df['company'].apply(HanziConv.toSimplified)
,报错如下:TypeError: 'float' object is not iterable