I have a Dataframe which looks like this:
Date Input Val1 Val2
1-Dec X 10 5
2-Dec Y 15
3-Dec Z 4 5
4-Dec A 10
i want the output in such a way, that if Val1 is present in then in the output val1 will be diplayed otherwise it will take the Val2 in the output, so my output will be:
Date Input Val1 Val2 Output
1-Dec X 10 5 10
2-Dec Y 15 15 since Val1 is missing so took Val2 in output
3-Dec Z 4 5 4
4-Dec A 10 10 since Val1 is missing so took Val2 in output
i tred pd.Concat but it is not giving correct output