I have a np.array.astype ('Datetime [s]') called T with several days at random times. I need to select a few days for separation.
I tried:
for i in np.arange(MinTime,MaxTime,np.timedelta64(1, 'D')):
mask = (T > i) & (T < (i + np.timedelta64(1, 'D')))
print (T[mask])
But adding a day brings problems since any day i returns part of the later day as well. Obviously I have to solve this, but I ask if there is any way more numpy / pandas / python to select dates any just with the day, something like :
print(T[T == '01-01-2006'])
See:
print (T[T == np.datetime64('01-01-2006')])
returns only on 01-01-2006 THE MIDNIGHT however I need all occurrences from 01-01-2006.