I have a series of strings in a dataframe, and I want to get rid of everything in the string once a number starts. Here's an example:
sstrings['abc12390859', 'def1959836', 'dab3496876', 'gh34643267']
so, in the end, I want it to be:
sstrings['abc', 'def', 'dab', 'gh']
I thought about doing something like:
df['sstrings'] = df['sstrings'].str.split()
but since the leading number isn't always the same, I'm not sure how to make that work.
I saw this but that doesn't seem to work with a series.
Is there a way to do this without looping through the series and using re.split
?