I am trying to copy text that appears between parentheses in a pandas DataFrame column into another column. I have come across this solution to parse strings accordingly: Regular expression to return text between parenthesis
I would like to assign the result element-by-element to the same row in a new column. However, this doesn't carry over directly to pandas Series. I seems that map/apply/lambda seems the way to go. I've arrived at this piece of code, but getting an invalid syntax error.
dataSources.dataUnits = dataSources.dataDescription.map(str.find("(")+1:str.find(")"))
Obviously, I'm not yet fluent enough there - help much appreciated.