Ben Chuanlong Du's Blog

It is never too late to learn.

Hands on the datetime Module in Python

Comment

A Datetime object cannot be compared with a string directly. However, pandas Series of datetime objects can be compared with string date directly (both by operators and methods). The comparison is done by parsing the string to a datetime object. An exception will be thrown if the string cannot be parsed into a datetime object.