У меня есть датафрейм:
df = pd.DataFrame({"id": [1,2,3,4,5],
"text": ["This is a ratio of 13.4/10","Favorate rate of this id is 11/9","It may not be a good looking person. But he is vary popular (15/10)","Ratio is 12/10","very popular 17/10"],
"name":["Joe","Adam","Sara","Jose","Bob"]})
, и я хочу извлечь цифры в два столбца, чтобы получить результат ниже:
df = pd.DataFrame({"id": [1,2,3,4,5],
"text": ["This is a ratio of 13.4/10","Favorate rate of this id is 11/9","It may not be a good looking person. But he is vary popular (15/10)","Ratio is 12/10","very popular 17/10"],
"name":["Joe","Adam","Sara","Jose","Bob"],
"rating_nominator":[13.4,11,15,12,17],
"rating_denominator":[10,9,10,10,10]})
Любая помощь приветствуется.