Round datetime64 array to nearest second
Round datetime64 array to nearest second Question: I have an array of type datetime64[ns]. Each element looks something like ‘2019-08-30T14:02:03.684000000’. How do I round the values to the nearest second such that I would obtain ‘2019-08-30T14:02:04’ in this example? I know I can truncate the values by t = t.astype(‘datetime64[s]’) but I specifically need to …