【发布时间】:2018-03-03 20:46:49
【问题描述】:
这是我的数据集的示例性摘录。如下所示:
Description;ID;Date
wa119:d Here comes the first row;id_112;2018/03/02
ax21:3 Here comes the second row;id_115;2018/03/02
bC230:13 Here comes the third row;id_234;2018/03/02
我想删除那些包含冒号的单词。在这种情况下,这将是 wa119:d、ax21:3 和 bC230:13,因此我的新数据集应如下所示:
Description;ID;Date
Here comes the first row;id_112;2018/03/02
Here comes the second row;id_115;2018/03/02
Here comes the third row;id_234;2018/03/02
很遗憾,我无法使用 gsub 找到正则表达式/解决方案?有人可以帮忙吗?
【问题讨论】:
-
示例数据的第三行包含两个带冒号的单词。请在您的问题文本中阐明您想要的输出。
-
谢谢。我相应地更新了数据框。