I have been struggling with this question for a long while, and I tried different methods.
I have a simple DataFrame as shown,
I can use code to rep
Make the column type as str first
dfTest2.InvoiceDate = dfTest2.InvoiceDate.astype(str)
then compare it directly with "NaT" and replace with None
dfTest2.InvoiceDate = dfTest2.InvoiceDate.apply(lambda x : None if x=="NaT" else x)