Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
                         )
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #nat
ADD COMMENT
Topic
Name
8+9 =