0
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 to:
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 up a day brings problems because any day i returns part of the later day as well. Obviously, you can fix this, but I ask if there is any more numpy/pandas/python way to select any dates only with the day, something like:
print(T[T == '01-01-2006'])
See that:
print (T[T == np.datetime64('01-01-2006')])
returns only 01-01-2006 THE MIDNIGHT BUT I NEED ALL OCCURRENCES 01-01-2006.