diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 04ff8ec9f430d..7dfd2b3112cc7 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6655,7 +6655,29 @@ def dropna( ignore_index: bool = False, ) -> DataFrame | None: """ - Remove missing values. + Examples +-------- +>>> df = pd.DataFrame({ +... 'A': [None, None, 3], +... 'B': [None, 2, 3], +... 'C': [None, None, None] +... }) +>>> df.dropna(how='all') + A B C +1 NaN 2.0 NaN +2 3.0 3.0 NaN + +>>> df = pd.DataFrame({ +... 'A': [1, None, None], +... 'B': [None, 2, None], +... 'C': [None, None, 3] +... }) +>>> df.dropna(thresh=2) + A B C +0 1.0 NaN NaN +1 NaN 2.0 NaN + + Remove missing values. See the :ref:`User Guide ` for more on which values are considered missing, and how to work with missing data.