@@ -5585,13 +5585,63 @@ def asof(self, where, subset=None):
5585
5585
# Action Methods
5586
5586
5587
5587
_shared_docs ['isna' ] = """
5588
+ Detect missing values.
5589
+
5588
5590
Return a boolean same-sized object indicating if the values are NA.
5591
+ NA values, such as None or :attr:`numpy.NaN`, gets mapped to True
5592
+ values.
5593
+ Everything else gets mapped to False values. Characters such as empty
5594
+ strings `''` or :attr:`numpy.inf` are not considered NA values
5595
+ (unless you set ``pandas.options.mode.use_inf_as_na = True``).
5596
+
5597
+ Returns
5598
+ -------
5599
+ %(klass)s
5600
+ Mask of bool values for each element in %(klass)s that
5601
+ indicates whether an element is not an NA value.
5589
5602
5590
5603
See Also
5591
5604
--------
5592
- %(klass)s.notna : boolean inverse of isna
5593
5605
%(klass)s.isnull : alias of isna
5606
+ %(klass)s.notna : boolean inverse of isna
5607
+ %(klass)s.dropna : omit axes labels with missing values
5594
5608
isna : top-level isna
5609
+
5610
+ Examples
5611
+ --------
5612
+ Show which entries in a DataFrame are NA.
5613
+
5614
+ >>> df = pd.DataFrame({'age': [5, 6, np.NaN],
5615
+ ... 'born': [pd.NaT, pd.Timestamp('1939-05-27'),
5616
+ ... pd.Timestamp('1940-04-25')],
5617
+ ... 'name': ['Alfred', 'Batman', ''],
5618
+ ... 'toy': [None, 'Batmobile', 'Joker']})
5619
+ >>> df
5620
+ age born name toy
5621
+ 0 5.0 NaT Alfred None
5622
+ 1 6.0 1939-05-27 Batman Batmobile
5623
+ 2 NaN 1940-04-25 Joker
5624
+
5625
+ >>> df.isna()
5626
+ age born name toy
5627
+ 0 False True False True
5628
+ 1 False False False False
5629
+ 2 True False False False
5630
+
5631
+ Show which entries in a Series are NA.
5632
+
5633
+ >>> ser = pd.Series([5, 6, np.NaN])
5634
+ >>> ser
5635
+ 0 5.0
5636
+ 1 6.0
5637
+ 2 NaN
5638
+ dtype: float64
5639
+
5640
+ >>> ser.isna()
5641
+ 0 False
5642
+ 1 False
5643
+ 2 True
5644
+ dtype: bool
5595
5645
"""
5596
5646
5597
5647
@Appender (_shared_docs ['isna' ] % _shared_doc_kwargs )
0 commit comments