datetime

Methods

Method Reference: datetime.year

datetime: Y = year (T)

Year component of a datetime array.

Y = year (T) returns the year number for each element of the input datetime array T. The output Y is a double array and it has the same size as T. Not-A-Time (NaT) values in T are returned as NaN in the output array.

Source Code: datetime