I am trying to create a new column with value 1 if the datetme index is less than some date and zero if it is greater. I tried the following code but it doesn\'t work as int