Answers for "pandas nat to null?"

0

pandas nat to null?

dfTest2['InvoiceDate'] = (dfTest2['InvoiceDate']
                          .astype(str) # <- cast to string to simplify
                                       #    .replace() in newer versions
                          .replace({'NaT': None} # <- replace with None
                         )
Posted by: Guest on April-15-2021

Python Answers by Framework

Browse Popular Code Answers by Language