extract ints from strings in Pandas
df['B'].str.extract('(\d+)').astype(int)
Source: stackoverflow.com
extract integer from a string in pandas
df['B'].str.extract('(\d+)').astype(int)
Source: stackoverflow.com