I\'m trying to test if one of my variables is pd.NaT. I know it is NaT, and still it won\'t pass the test. As an example, the following code prints nothing :
If it's in a Series (e.g. DataFrame column) you can also use .isna():
Series
DataFrame
.isna()
pd.Series(pd.NaT).isna() # 0 True # dtype: bool