texto=[]
date=[]
api = tweepy.API(auth)
uno = tweepy.Cursor (api.search,q=`Bocconi`, rpp=100, result_type="recent", include_entities=True, lang="it").items()
for i in uno:
o = i.text
g = str(o).replace('\n',' ').replace('\r\n', ' ').replace('%\n%', ' ').replace('\r', ' ').replace('%\r%', ' ').replace('%\r\n%', ' ')
texto.append(g)
e=i.created_at
date.append(e)
Bocconi = pd.DataFrame(index=range(0,len(texto)))
Bocconi['texto']=texto
Bocconi['date']=date
Bocconi.to_csv("Bocconi.csv",sep='\t')
我遇到了这个特定的失败:
return codecs.charmap_encode(input,errors,encoding_table)UnicodeEncodeError:' charmap'编解码器不能对字符u' \ u2714'进行编码。在位置0:字符映射到未定义> -