如何从字符串中删除“\x80”

2024-09-27 09:37:25 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个CSV文件以“latin1”编码打开。然而,阅读表情符号似乎有问题。我想删除所有的表情符号。它显示为方形框,当我更改为列表时,它将更改为“\x80”。有什么办法可以移除这个

df = pd.read_csv(r"myfilepath", encoding='latin1')

I have a CSV file opened with 'latin1' encoding. However, there seems to be a problem with reading emojis. I want to remove all the emojis. It shows as square box and when I change to list, it changes to "\x80". Is there any way I can remove this??


Tags: 文件csv编码df列表readencodingpd

热门问题