xxxxxxxxxx
value = '12 QZR 44A'
def remove_numbers(name):
return re.sub(r'\w*\d\w*', '', name).strip()
value.apply(remove_numbers)
xxxxxxxxxx
# credit to the Stack Overflow user in the source link
# add a space before \d+ to exclude numbers close to letters, as b3 for example
s = "This must not be deleted, but the number at the end yes 134411"
s = re.sub("\d+", "", s)
xxxxxxxxxx
#remove any number from a string
string = 'abc123'
remove_num = ''.join(i for i in string if not i.isdigit()