我需要删除字符串列表:
list_strings=['describe','include','any']
来自 pandas 的专栏:
My_Column
include details about your goal
describe expected and actual results
show some code anywhere
我试过
df['My_Column']=df['My_Column'].str.replace('|'.join(list_strings), '')
但它删除了部分单词。
例如:
My_Column
details about your goal
expected and actual results
show some code where # here it should be anywhere
我的预期输出:
My_Column
details about your goal
expected and actual results
show some code anywhere
慕姐4208626
慕的地6264312
慕神8447489
相关分类