我有一个python中的数据帧
word string count wordSummary
apple One apple price is 40
apple one apple price is 50 and three apples price are 60 but apple....
我想从字符串中计算确切的单词,并在单词之前和之后的5chars中计算5chars
word string count wordSummary
apple One apple price is 40 1 Once apple price
apple one apple price is 50 and three apples price are 60 but apple 2 one apple price
我尝试了以下部分,但显示错误。
df["count"] = df["string"].count(df["word"])
慕桂英4014372
相关分类