使用正则表达式时,我得到:import restring = r'http://www.example.com/abc.html'result = re.search('^.*com', string).group()在熊猫中,我写道:df = pd.DataFrame(columns = ['index', 'url'])df.loc[len(df), :] = [1, 'http://www.example.com/abc.html']df.loc[len(df), :] = [2, 'http://www.hello.com/def.html']df.str.extract('^.*com')ValueError: pattern contains no capture groups如何解决问题?
添加回答
举报
0/150
提交
取消