@@ -36,7 +36,7 @@ When / why does data become missing?
36
36
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37
37
38
38
Some might quibble over our usage of *missing *. By "missing" we simply mean
39
- **null ** or "not present for whatever reason". Many data sets simply arrive with
39
+ **na ** or "not present for whatever reason". Many data sets simply arrive with
40
40
missing data, either because it exists and was not collected or it never
41
41
existed. For example, in a collection of financial time series, some of the time
42
42
series might start on different dates. Thus, values prior to the start date
@@ -63,27 +63,27 @@ to handling missing data. While ``NaN`` is the default missing value marker for
63
63
reasons of computational speed and convenience, we need to be able to easily
64
64
detect this value with data of different types: floating point, integer,
65
65
boolean, and general object. In many cases, however, the Python ``None `` will
66
- arise and we wish to also consider that "missing" or "null ".
66
+ arise and we wish to also consider that "missing" or "na ".
67
67
68
68
.. note ::
69
69
70
70
Prior to version v0.10.0 ``inf `` and ``-inf `` were also
71
- considered to be "null " in computations. This is no longer the case by
72
- default; use the ``mode.use_inf_as_null `` option to recover it.
71
+ considered to be "na " in computations. This is no longer the case by
72
+ default; use the ``mode.use_inf_as_na `` option to recover it.
73
73
74
- .. _missing.isnull :
74
+ .. _missing.isna :
75
75
76
76
To make detecting missing values easier (and across different array dtypes),
77
- pandas provides the :func: `~pandas.core.common.isnull ` and
78
- :func: `~pandas.core.common.notnull ` functions, which are also methods on
77
+ pandas provides the :func: `isna ` and
78
+ :func: `notna ` functions, which are also methods on
79
79
``Series `` and ``DataFrame `` objects:
80
80
81
81
.. ipython :: python
82
82
83
83
df2[' one' ]
84
- pd.isnull (df2[' one' ])
85
- df2[' four' ].notnull ()
86
- df2.isnull ()
84
+ pd.isna (df2[' one' ])
85
+ df2[' four' ].notna ()
86
+ df2.isna ()
87
87
88
88
.. warning ::
89
89
@@ -206,7 +206,7 @@ with missing data.
206
206
Filling missing values: fillna
207
207
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
208
208
209
- The **fillna ** function can "fill in" NA values with non-null data in a couple
209
+ The **fillna ** function can "fill in" NA values with non-na data in a couple
210
210
of ways, which we illustrate:
211
211
212
212
**Replace NA with a scalar value **
@@ -220,7 +220,7 @@ of ways, which we illustrate:
220
220
**Fill gaps forward or backward **
221
221
222
222
Using the same filling arguments as :ref: `reindexing <basics.reindexing >`, we
223
- can propagate non-null values forward or backward:
223
+ can propagate non-na values forward or backward:
224
224
225
225
.. ipython :: python
226
226
@@ -288,7 +288,7 @@ a Series in this case.
288
288
289
289
.. ipython :: python
290
290
291
- dff.where(pd.notnull (dff), dff.mean(), axis = ' columns' )
291
+ dff.where(pd.notna (dff), dff.mean(), axis = ' columns' )
292
292
293
293
294
294
.. _missing_data.dropna :
0 commit comments