You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Beware of using logic with things that are <em>not</em> what they appear:</p>
415
415
<ul>
416
416
<li><code>None</code> is Python’s way of saying that something has <strong>no value at all</strong> (not <code>0</code> or <code>""</code>… but <em>None</em>). It is a <strong>class</strong>.</li>
417
-
<li>NaN (Not a Number) is a special numeric data type provided by the <code>numpy</code> package to deal with things like -ve and +ve infinity and similar ‘issues’.</li>
417
+
<li>NaN (Not a Number) is a special numeric data type provided by the <code>numpy</code> package to deal with things that aren’t numbers. -ve and +ve infinity are handled by a similarly special <code>np.inf</code>.</li>
418
418
</ul>
419
-
<p><code>np.nan</code> should be used whenever you are dealing with <em>data</em> (<em>e.g.</em> see Pandas!).</p>
419
+
<p><code>np.nan</code> should be used whenever you are dealing with errors/nulls in <em>data</em> (<em>e.g.</em> see Pandas!).</p>
"text": "Nulls: None vs. NaN\nBeware of using logic with things that are not what they appear:\n\nNone is Python’s way of saying that something has no value at all (not 0 or \"\"… but None). It is a class.\nNaN (Not a Number) is a special numeric data type provided by the numpy package to deal with things like -ve and +ve infinity and similar ‘issues’.\n\nnp.nan should be used whenever you are dealing with data (e.g. see Pandas!)."
6424
+
"text": "Nulls: None vs. NaN\nBeware of using logic with things that are not what they appear:\n\nNone is Python’s way of saying that something has no value at all (not 0 or \"\"… but None). It is a class.\nNaN (Not a Number) is a special numeric data type provided by the numpy package to deal with things that aren’t numbers. -ve and +ve infinity are handled by a similarly special np.inf.\n\nnp.nan should be used whenever you are dealing with errors/nulls in data (e.g. see Pandas!)."
0 commit comments