Q:

Python: Conditionally Create New Column Based on Two Other Columns (including negative values)

Currently I have the data frame below.  The first two columns are what I have...and I want to create the third column ('Value_2_Replaced).  

Essentially, if Value_1 is a positive number, then I want to compare Value_1 with Value_2 and the one with smaller value gets placed in third column. 
The tricky part is when Value_2 is negative.  If Value_2 is negative but greater than Value_1, I want Value_2_Replaced to equal Value_1 but retain its negative value.  
Below is the code I have tried but it does not account for the negative Value_2 situation.  Any help is greatly appreciated!   
df["Value_2_Replaced"] = df[["Value_1", "Value_2"]].min(axis=1)

A:

You might multiply the sign of Value_2 with the absolute min of columns Value_1 and Value_2:
df["Value_2_Replaced"] = pd.np.sign(df.Value_2) * df[["Value_1", "Value_2"]].abs().min(1)

df
#Account  Value_1   Value_2   Value_2_Replaced
#0     A      100       200             100
#1     B      200       400             200
#2     C      300      -400            -300
#3     D      700      -800            -700

