【发布时间】:2020-07-31 23:59:06
【问题描述】:
joined_Gravity1.head()
Comments
____________________________________________________
0 Why the old Pike/Lyrik?
1 This is good
2 So clean
3 Looks like a Decoy
Input: type(joined_Gravity1)
Output: pandas.core.frame.DataFrame
以下代码允许我选择包含关键字的字符串:“ender”
joined_Gravity1[joined_Gravity1["Comments"].str.contains("ender", na=False)]
输出:
Comments
___________________________
194 We need a new Sender ????
7 What about the sender
179 what about the sender?????
如何修改代码以包含类似于“Sender”的单词,例如“snder”、“bender”?
【问题讨论】:
标签: python python-3.x regex list regex-group