Numpy: Überprüfen, ob ein Wert NaT @ i

nat = np.datetime64('NaT')
nat == nat
>> FutureWarning: In the future, 'NAT == x' and 'x == NAT' will always be False.

np.isnan(nat)
>> TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

Wie kann ich überprüfen, ob ein datetime64 NaT ist? Ich kann anscheinend nichts aus den Dokumenten herausholen. Ich weiß, dass Pandas das können, aber ich möchte lieber keine Abhängigkeit für etwas so Grundlegendes hinzufügen.

Antworten auf die Frage(12)

Ihre Antwort auf die Frage