How to check if a pandas Series contains Timestamps?

Viewed 10541

Following seems to work at least in some cases:

series.dtype == np.dtype('<M8[ns]')

but it doesn't look pretty and I'm not sure if it works always (with all(?) kinds of Timestamps).

Is there a nicer way for testing whether a column contains Timestamps?

2 Answers
Related