I have the following array of type <class 'numpy.ndarray'>
array([20181010, 20181031, 20181116, 20181012, 20181005, 20181008,
20181130, 20181011, 20181005, 20181116])
How can I convert its constituents from the current type <class 'numpy.int64'> to datetime in numpy? I want to find a quick way and my understanding is that using a loop or list comprehension, as well as converting this numpy.array to pandas or to a list will be slower.
Please correct me if I am wrong.
P.S. This question may have been answered somewhere, but I could not find a single solution which works.
@Sebastian's answer is superior to the duplicate, https://stackoverflow.com/questions/27103044/converting-datetime-string-to-datetime-in-numpy-python, even though both usepd.to_datetime`.