I have a pandas dataframe and want to add a new column. For all values in 'number' which are smaller than 15 I want to add 1, for all values which are greater, 0. I tried different methods, but I don't receive the desired result.Especially, because I have problems with the structure. Here is what I wanna do:
number binary
12 1
89 0
12 1
56 0
62 0
2 1
657 0
5 1
73 0