Skip to content

Instantly share code, notes, and snippets.

View tanveer-sayyed's full-sized avatar

vernal-inertia tanveer-sayyed

  • Spherex
  • Mumbai
View GitHub Profile
In [21]:
series_with_all_missing + series_with_2_missing
Out[21]:
0 NaN
1 NaN
2 NaN
3 NaN
dtype: float64
# 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])
@tanveer-sayyed
tanveer-sayyed / NaN-1.py
Last active February 23, 2019 12:31
NaN-1.py
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)