【发布时间】:2017-05-15 20:51:54
【问题描述】:
如何将以下内容与 pandas extractall 正则表达式匹配:
stringwithinmycolumn
stuff, Duration: 15h:22m:33s, notstuff,
stuff, Duration: 18h:22m:33s, notstuff,
目前,我正在使用以下内容:
df.message.str.extractall(r',([^,]*?): ([^,:]*?,').reset_index()
预期输出:
0 1
match
0 Duration 15h:22m:33s
1 Duration 18h:22m:33s
到目前为止,我无法匹配。
【问题讨论】:
标签: python regex python-3.x pandas