This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [21]: | |
series_with_all_missing + series_with_2_missing | |
Out[21]: | |
0 NaN | |
1 NaN | |
2 NaN | |
3 NaN | |
dtype: float64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creating series | |
series_with_all_missing = pd.Series([None, None, np.nan, np.nan]) | |
series_with_2_missing = pd.Series([1, np.nan, 2, np.nan]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [12]: | |
# Both are not equal | |
print(np.NaN == None) | |
# In a condition we cannot get hold of a NaN value | |
print(np.nan == np.nan) | |
# But we can hold None just like strings ["missing”, “not available”, “NA”] | |
print(None == None) |
NewerOlder