I have a pandas dataframe which I would like to add a new column to. The new column values will be determined by an existing column in the dataframe which contains bools. The code below is my C++ logic applied in python but I would like a more 'pythonic' way to do this. 'isfixed' contains the bools and the new column will be 'color code'
for i in range(data_2015['isfixed'].count()):
if data_2015['isfixed'][i] == True:
data_2015['color code'][i] = 'Blue'
else:
data_2015['color code'][i] = 'Green'
Thanks in advance for the help!