📜  熊猫 nat 为空? - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:37.757000             🧑  作者: Mango

代码示例1
dfTest2['InvoiceDate'] = (dfTest2['InvoiceDate']
                          .astype(str) # <- cast to string to simplify
                                       #    .replace() in newer versions
                          .replace({'NaT': None} # <- replace with None
                         )