pandas extract number from string code example Example: extract ints from strings in Pandas df['B'].str.extract('(\d+)').astype(int)