1dfTest2['InvoiceDate'] = (dfTest2['InvoiceDate']
2 .astype(str) # <- cast to string to simplify
3 # .replace() in newer versions
4 .replace({'NaT': None} # <- replace with None
5 )
6