I have a DataFrame, let's say:
#d = {'col1': [1, 2, 3], 'col2': [3, 4, 5]} // that's what the data might look like
df = pd.DataFrame(data=d)
and I have a np array with [0, 2].
Now I want to add a column to the DataFrame, where there is a 1, when the index of the row is in the np array, otherwise a 0.
Does anyone have an idea?