Most efficient for a big dataset in pandas:
I would like to add a new column Z taking the value from X if there is a value, if not, I want to take the value from Y.
Another thing, it there a possibility to use ternary operations to add a new column Z based on, if column Y exist then column Y - column X, if not, then only X.
I'm looking for the most efficient way in both cases.
Thank you