BUG/API Should pd.NaT < "foo" raise? #35046
Labels
Bug
Datetime
Datetime data dtype
Error Reporting
Incorrect or improved errors from pandas
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone
If we treat NaT as a datetime, we would expect pd.NaT == "foo" to return False, != to return True, and for the inequalities to raise:
It isn't obvious to me that the existing behavior is intentional. If we change this to raise, we can simplify
NaT.__richcmp__
a bit.The text was updated successfully, but these errors were encountered: