【发布时间】:2022-06-30 16:35:57
【问题描述】:
以前一切正常,但现在当我尝试使用 googletrans 库时出错。这是我的代码
import googletrans
from googletrans import Translator
translator = Translator()
df['data'] = df['tweet'].apply(lambda x: translator.translate(x, dest='en').text)
| 0 | tweet |
|---|---|
| 0 | Heureusement que Macron n'a pas profité de la guerre en Ukraine pour être réélu mdr |
| 1 | L'Ukraine Ce pays formidable N'est-ce pas Macron le fou |
【问题讨论】:
标签: python