<jupyter_start><jupyter_text>NaN<jupyter_code>import math
import numpy as np
math.nan
np.nan
print(math.isnan(np.nan))
print(np.isnan(math.nan))
arr = np.array([1, np.nan, 3, np.nan, 5])

print(arr)
np.isnan(arr)
arr[np.isnan(arr)]
np.logical_not(np.isnan(arr))
arr[np.logical_not(np.isnan(arr))]
arr[~(np.isnan(arr))]
arr = np.arange(100)
arr[np.logical_and(arr > 10, arr < 50)]
arr[np.logical_or(arr < 10, arr > 50)]
np.nan == np.nan<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1978494623655914, 'fraction_numerical': 0.030107526881720432, 'mean_word_length': 6.396825396825397, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '238749', 'license': 'MIT', 'n_tokens_mistral': 233, 'n_tokens_neox': 219, 'n_words': 34, 'path': 'jupyter_labs_conda/07_NumPy_NaN_LogicalOps.ipynb', 'repo_name': 't4d-classes/python-data-analysis_06022021', 'size': '465'}