【发布时间】:2021-01-24 18:40:29
【问题描述】:
我的列表包含一些词,例如:[‘orange’, ‘cool’, ‘app’....],我想从 DataFrame 的描述列中输出所有这些确切的完整词(如果可用)。
我还附上了带有代码的示例图片。我用了str.findall(),如图所示,它从additional中提取add,从apple中提取app。但是,我不希望那样。它应该只在匹配整个单词时才输出。
【问题讨论】:
标签: python regex pandas findall exact-match