I have a pandas dataframe of descriptions like this:
df['description']
22CI003294 PARCEL 32
22CI400040 NORFOLK ESTATES
12CI400952 & 13CI403261
22CI400628 GARDEN ACRES
9CI00208 FERNHAVEN SEC
22CI400675 CECIL AVE SUB
22CI400721 124.69' SS
BOLLING AVE SS
I want to extract the first alphanumeric characters that are at least 6 characters in length. They have to start with a digit and then can repeat any amount of digit or letters. So, expected results from above:
22CI003294
22CI400040
12CI400952
22CI400628
9CI00208
22CI400675
22CI400721
None
What I have tried:
df['results'] = df['description'].str.extract(r'(\d*\w+\d+\w*){6,}')
When I added in {6,}
at the end I suddenly get no matches. Please advise.