Pandas in Dataframe,series have IsNull () method, and the data frame is not, use will be error: Attributeerror: ' Float ' object has no attribute ' IsNull '
How to tell if a single box is Np.nan
Python's general judgment, = =, and is, which is valid for none
None is None
OUT[49]: True
none = = None
OUT[50]: True
And yes, Np.nan, can only use is
Da1pd.ix[6000996,u ' team '] = = Np.nan
OUT[41]: False
Da1pd.ix[6000996,u ' team '] is Np.nan
OUT[42]: True
Np.nan! = Np.nan
OUT[43]: True
Np.nan is not none.
None = = Np.nan
OUT[46]: False
none!= Np.nan
OUT[47]: True
None is Np.nan
OUT[48]: False
This is related to the method of judging the IS and = =, whether it is the same object, such as a constant, a constant string
1 is 1
OUT[51]: True
and ' = = ' is the value judgment, the value of two variables is equal.
U = 156
v = 156
U is V
OUT[58]: True
#因为, Python, a reference to assigning a value to a variable, the default is the address, so the same object is assigned, and the same object
U = 156.0
U is V
OUT[60]: False
U = = V
OUT[61]: True
# An assignment integer that does not point to an object when it is assigned a floating-point number. Just the same value.
Back to the beginning, Np.nan should be no value, so can not be judged, only with the object reference to judge, and none has a null value, so it is also possible to determine the value.
Python value comparison, Np.nan is Np.nan but Np.nan! = Np.nan, pandas single data frame value to Judge Nan