DataFrame example :
| ID | Rule | Postion |
|---|---|---|
| 1233 | M-4/32 | 516.00 |
| 1235 | M-8/32 | 716.00 |
| 1236 | M-2/32 | 816.00 |
I need to split the Rule column which I tried to handle with:
DataFrame['effective date'] = DataFrame['Rule'].str.split(expand=True)
However this is not working the way I expected.
From there I need to convert the fraction portion of the rule column to a decimal and I cant figure out how.
If I can get the str.split function to work the way I need the conversion of the fraction should be straight forward.
Expected results:
| ID | Rule | Postion | Rule Final |
|---|---|---|---|
| 1233 | M-4/32 | 516.00 | 0.125 |
| 1235 | M-8/32 | 716.00 | 0.25 |
| 1236 | M-2/32 | 816.00 | 0.0625 |