mask = Data['Close'] > Data['Open']
Data['Test'] = pandas.concat([Data['Close'][mask].dropna(), Data['Open'][~
    mask].dropna()]).reindex_like(Data)
New column based on conditional selection from the values of 2 other columns in a Pandas DataFrame