可以这样做extract:
df =pd.DataFrame({'text':["Who would have thought this would be so 4347009 difficult",
"24 is me"]})
df['new_col'] = df['text'].str.extract(r'(\d+)')
text new_col
0 Who would have thought this would be so 434700... 4347009
1 24 is me 24