how to convert timedelta64[ns] to int?
You can do: 

 t, _ , _ = "01:00:00".split(":")


and then:

int(t)


That will return you: 1.

Putting this together as a function would be:

def time_to_integer(time):
    t, _,_ = time.split(":")
    return int(t)


Please note that you should pass the time variable as string. For example: 

time_to_integer("02:00:00")


Would return: 2