I would like to create a boolean column in a pandas data frame of length 499. I have an array a of index values :
a = np.array([206, 252, 272, 315, 349, 374, 394, 406, 440, 466])
I would like a column of True values at these index positions in the df data frame. Simplified example to work on:
arr = np.array(range(0,499))
df = pd.DataFrame(data = arr, columns = ['var1'])
any ideas?