@@ -6114,7 +6114,6 @@ def case_when(
61146114 return default
61156115
61166116 # error: Cannot determine type of 'isna'
6117-
61186117 def isna (self ) -> Series :
61196118 """
61206119 Detect missing values.
@@ -6184,80 +6183,14 @@ def isna(self) -> Series:
61846183 return NDFrame .isna (self )
61856184
61866185 # error: Cannot determine type of 'isna'
6187-
6186+ @ doc ( NDFrame . isna , klass = _shared_doc_kwargs [ "klass" ]) # type: ignore[has-type]
61886187 def isnull (self ) -> Series :
61896188 """
6190-
61916189 Series.isnull is an alias for Series.isna.
6192-
6193- Detect missing values.
6194-
6195- Return a boolean same-sized object indicating if the values are NA.
6196- NA values, such as None or :attr:`numpy.NaN`, gets mapped to True
6197- values.
6198- Everything else gets mapped to False values. Characters such as empty
6199- strings ``''`` or :attr:`numpy.inf` are not considered NA values.
6200-
6201- Returns
6202- -------
6203- Series
6204- Mask of bool values for each element in Series that
6205- indicates whether an element is an NA value.
6206-
6207- See Also
6208- --------
6209- Series.isnull : Alias of isna.
6210- Series.notna : Boolean inverse of isna.
6211- Series.dropna : Omit axes labels with missing values.
6212- isna : Top-level isna.
6213-
6214- Examples
6215- --------
6216- Show which entries in a DataFrame are NA.
6217-
6218- >>> df = pd.DataFrame(
6219- ... dict(
6220- ... age=[5, 6, np.nan],
6221- ... born=[
6222- ... pd.NaT,
6223- ... pd.Timestamp("1939-05-27"),
6224- ... pd.Timestamp("1940-04-25"),
6225- ... ],
6226- ... name=["Alfred", "Batman", ""],
6227- ... toy=[None, "Batmobile", "Joker"],
6228- ... )
6229- ... )
6230- >>> df
6231- age born name toy
6232- 0 5.0 NaT Alfred NaN
6233- 1 6.0 1939-05-27 Batman Batmobile
6234- 2 NaN 1940-04-25 Joker
6235-
6236- >>> df.isna()
6237- age born name toy
6238- 0 False True False True
6239- 1 False False False False
6240- 2 True False False False
6241-
6242- Show which entries in a Series are NA.
6243-
6244- >>> ser = pd.Series([5, 6, np.nan])
6245- >>> ser
6246- 0 5.0
6247- 1 6.0
6248- 2 NaN
6249- dtype: float64
6250-
6251- >>> ser.isna()
6252- 0 False
6253- 1 False
6254- 2 True
6255- dtype: bool
62566190 """
62576191 return super ().isnull ()
62586192
62596193 # error: Cannot determine type of 'notna'
6260-
62616194 def notna (self ) -> Series :
62626195 """
62636196 Detect existing (non-missing) values.
@@ -6327,75 +6260,10 @@ def notna(self) -> Series:
63276260 return super ().notna ()
63286261
63296262 # error: Cannot determine type of 'notna'
6330-
6263+ @ doc ( NDFrame . notna , klass = _shared_doc_kwargs [ "klass" ]) # type: ignore[has-type]
63316264 def notnull (self ) -> Series :
63326265 """
6333-
63346266 Series.notnull is an alias for Series.notna.
6335-
6336- Detect existing (non-missing) values.
6337-
6338- Return a boolean same-sized object indicating if the values are not NA.
6339- Non-missing values get mapped to True. Characters such as empty
6340- strings ``''`` or :attr:`numpy.inf` are not considered NA values.
6341- NA values, such as None or :attr:`numpy.NaN`, get mapped to False
6342- values.
6343-
6344- Returns
6345- -------
6346- Series
6347- Mask of bool values for each element in Series that
6348- indicates whether an element is not an NA value.
6349-
6350- See Also
6351- --------
6352- Series.notnull : Alias of notna.
6353- Series.isna : Boolean inverse of notna.
6354- Series.dropna : Omit axes labels with missing values.
6355- notna : Top-level notna.
6356-
6357- Examples
6358- --------
6359- Show which entries in a DataFrame are not NA.
6360-
6361- >>> df = pd.DataFrame(
6362- ... dict(
6363- ... age=[5, 6, np.nan],
6364- ... born=[
6365- ... pd.NaT,
6366- ... pd.Timestamp("1939-05-27"),
6367- ... pd.Timestamp("1940-04-25"),
6368- ... ],
6369- ... name=["Alfred", "Batman", ""],
6370- ... toy=[None, "Batmobile", "Joker"],
6371- ... )
6372- ... )
6373- >>> df
6374- age born name toy
6375- 0 5.0 NaT Alfred NaN
6376- 1 6.0 1939-05-27 Batman Batmobile
6377- 2 NaN 1940-04-25 Joker
6378-
6379- >>> df.notna()
6380- age born name toy
6381- 0 True False True False
6382- 1 True True True True
6383- 2 False True True True
6384-
6385- Show which entries in a Series are not NA.
6386-
6387- >>> ser = pd.Series([5, 6, np.nan])
6388- >>> ser
6389- 0 5.0
6390- 1 6.0
6391- 2 NaN
6392- dtype: float64
6393-
6394- >>> ser.notna()
6395- 0 True
6396- 1 True
6397- 2 False
6398- dtype: bool
63996267 """
64006268 return super ().notnull ()
64016269
0 commit comments