【发布时间】:2018-09-06 03:12:05
【问题描述】:
Python 3.6。我有 DataFrame 警告:
UserWarning: This pattern has match groups. To actually get the groups, use str.extract.
使用这种模式:
laDataTemps.loc[laDataTemps['texte'].str.contains(r'\b(word1|word2)\b', regex=True)]
或者,如果我删除括号以避免分组,它的含义就不一样了。关于如何更改模式以删除警告的任何想法?谢谢!
【问题讨论】:
标签: python regex python-3.x spark-dataframe