1 . 去掉一行字符串中的汉字
english_only = ''.join(x for x in str(col) if ord(x) < 256)
2. 去掉字符串中所有的英文以及一些特殊符号
#re是一个python库,需要提前倒入这个库
str = re.sub("[A-Za-z0-9\!\%\[\]\,\。\.]", "", col)
english_only = ''.join(x for x in str(col) if ord(x) < 256)
#re是一个python库,需要提前倒入这个库
str = re.sub("[A-Za-z0-9\!\%\[\]\,\。\.]", "", col)