I have a df in which I first split col1 at "-". This results "None" values in col3 if delimiter does not exist in the col1.
Now, if col3 is "None", I want to replace it with col2 values (inplace replacement)
#df col1 col2 col3 45-65 45 65 56 56 None #desired df col1 col2 col3 45-65 45 65 55 55 55
How can I do this in pandas.