I'm using python to extract dollar amounts from six to seven figures with dollars and comma separated. My regex tool capture both amounts but python throws a value error. Not sure what is causing this. It works if I remove the Boolean but I have to create separate columns.
df3['Price'] = df3['Listings'].str.extract('(\$?\d{3}\,\d{3})|(\$?\d{1}\,\d{3}\,\d{3})',expand = True)
ValueError: Wrong number of items passed 2, placement implies 1