I have an input -Dimension and I want my output in a specific form extracted from the text that I have in the dimension column.
I have used
df['output'] = df['Dimension'].str.extractall(r'(\d*\.?\d+)').astype(float).unstack().prod(axis=1)
but i'm not able to print the desired output for Model E. Please help me here in python.
| Model | Dimension | output |
|---|---|---|
| A | 4.31 m x 2 m x 3.222 m | 27.77364 |
| B | 220m | 220 |
| C | 'St 473m | 473 |
| D | rangeZng 2x250m | 500 |
| E | Original 250ml 2s 35% | 500 |
| F | Qstd 550ml 1+1 | 550 |
| G | very good cream 250ml 2s 35% | 500 |
| H | very good cream 250ml 2s 45% | 500 |