I have a dataframe, 'sp', with a column, 'RouteIdentifier', which contains a state route and additional noise. I want to get the numerical substring from each row, preferably without leading 0s, and place it as an int into a new column.
What I've succeeded in doing is extracting the numbers, but they are inserted into the new column as list objects (e.g. '012d' -> [012]).
sp.insert(1, 'StateRoute', [re.findall(r'\d+', x) for x in sp['RouteIdentifier']])