I am trying to clean some data in a CSV that I have
I am trying to split addresses using the street suffix as a delimiter/separator:
- 68 E 89TH ST LOS ANGELES ->
[68 E 89TH ST, LOS ANGELES] - 3661 SUNSWEPT PWKY STUDIO CITY ->
[3661 SUNSWEPT PKWY , STUDIO CITY]
I would like to run the following:
df1_splitz = pd.DataFrame(df1['owner_address'].str.split('(?<=DR|ST|PL|RD|LN|CT|CIR|AVE|HWY|WAY|BLVD|PKWY)\s',1).tolist(),columns=['street','city'])
Main problem: Avoid "look-behind requires a fixed-width pattern" error.
Is there a method I can use to get around this error? Any help would be greatly appreciated. Thanks in advance.