Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Pandas: Ternary conditional operator for setting a value in a DataFrame

pd['irr'] = np.where(pd['cs']*0.63 > pd['irr'], 1.0, 0.0)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Ternary #conditional #operator #setting #DataFrame
ADD COMMENT
Topic
Name
6+7 =