I have a dataframe df which has one of the column called "Results". That columns has values like -
Results
Movie passed 1 of 3 tests
Movie passed 2 of 3 tests
Movie passed 3 of 3 tests
<empty string>
Movie passed 1 of 3 tests
I want to create a new column which extract the number of tests movie passed. In above case, the new column called new_results should have values like:
new_results
1
2
3
0
1
Please note that it puts '0' in case of null values. How do I achieve this task using pandas?