[Numpy-discussion] dates, np.where finding months
John [H2O]
washakie at gmail.com
Wed Jan 20 09:01:21 EST 2010
I have an array with the leading column a series of datetime objects. It
covers several years. What is the most efficient way to pull out all the
'January' dates?
Right now I do this:
A = array with column 0 datetime objects
January = [i for i in A if i[0].month ==1 ]
It works, but I would rather use np.where and get indices and not have to
convert my list back into an array.
--
View this message in context: http://old.nabble.com/dates%2C-np.where-finding-months-tp27242195p27242195.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.
More information about the NumPy-Discussion
mailing list