How do I create a new column where the values are selected based on existing columns?
How do I add a color
column to the following dataframe so that color='green'
if Set == 'Z'
, and color='red'
otherwise?
Selecting 1 of 3 colums as value for new column, based on criteria in row
So I have data with the following format
Getting the random rows from the DataFrame with step
As getting the random values can be retrieved by using range(start, stop[, step])