Jul-13-2019, 12:01 PM
(Jul-13-2019, 10:54 AM)SriMekala Wrote: I want to add a new column, for this condition.I don't understand this,
.loc
selector automatically creates a new column if needed. In the code above a new column named
value
is created. Probably, you need to add a line df.loc[:, 'value'] = df.Status
before assigning zero values using the condition.