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 replace NaN
with None
(Not String "None"),
[![dfTest2 = dfTest.where(pd.notnull(dfTest), None)][2]][2]
I support that NaT
is also classified as 'Null' because the following,
However, NaT
is not replaced with None
.
I have been searching for answers but got no luck. Anyone could Help?
Thank you in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…