MY DATA (https://i.stack.imgur.com/7QNkp.png)
Suppose that we have these kind of table, I would like to create new column as named 'Number'. if 'sentence' column contains the word 'fud', create column includes just the numbers that are in the column 'sentence' after the word fud
I write sth. but I could not appointed the value according to the numbers after the word of 'fud'. Could you help me?
I tried it;
import pandas as pd
import numpy as nd
excel_file = 'SUT.xlsx'
df = pd.read_excel(excel_file)
df['Number'] = ''
df["Number"][df["Sentence"].str.contains("fud")] = **cant find what I will write**
print(df)
my expected result is like this (https://i.stack.imgur.com/AQ1zF.png)