def dropna(self, axis: Axis=0, how: str='any', thresh: Optional[int]=None, subset: Optional[Union[(Name, List[Name])]]=None, inplace: bool=False) -> Optional['DataFrame']:
    '\n        Remove missing values.\n\n        Parameters\n        ----------\n        axis : {0 or \'index\'}, default 0\n            Determine if rows or columns which contain missing values are\n            removed.\n\n            * 0, or \'index\' : Drop rows which contain missing values.\n        how : {\'any\', \'all\'}, default \'any\'\n            Determine if row or column is removed from DataFrame, when we have\n            at least one NA or all NA.\n\n            * \'any\' : If any NA values are present, drop that row or column.\n            * \'all\' : If all values are NA, drop that row or column.\n\n        thresh : int, optional\n            Require that many non-NA values.\n        subset : array-like, optional\n            Labels along other axis to consider, e.g. if you are dropping rows\n            these would be a list of columns to include.\n        inplace : bool, default False\n            If True, do operation inplace and return None.\n\n        Returns\n        -------\n        DataFrame\n            DataFrame with NA entries dropped from it.\n\n        See Also\n        --------\n        DataFrame.drop : Drop specified labels from columns.\n        DataFrame.isnull: Indicate missing values.\n        DataFrame.notnull : Indicate existing (non-missing) values.\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({"name": [\'Alfred\', \'Batman\', \'Catwoman\'],\n        ...                    "toy": [None, \'Batmobile\', \'Bullwhip\'],\n        ...                    "born": [None, "1940-04-25", None]},\n        ...                   columns=[\'name\', \'toy\', \'born\'])\n        >>> df\n               name        toy        born\n        0    Alfred       None        None\n        1    Batman  Batmobile  1940-04-25\n        2  Catwoman   Bullwhip        None\n\n        Drop the rows where at least one element is missing.\n\n        >>> df.dropna()\n             name        toy        born\n        1  Batman  Batmobile  1940-04-25\n\n        Drop the columns where at least one element is missing.\n\n        >>> df.dropna(axis=\'columns\')\n               name\n        0    Alfred\n        1    Batman\n        2  Catwoman\n\n        Drop the rows where all elements are missing.\n\n        >>> df.dropna(how=\'all\')\n               name        toy        born\n        0    Alfred       None        None\n        1    Batman  Batmobile  1940-04-25\n        2  Catwoman   Bullwhip        None\n\n        Keep only the rows with at least 2 non-NA values.\n\n        >>> df.dropna(thresh=2)\n               name        toy        born\n        1    Batman  Batmobile  1940-04-25\n        2  Catwoman   Bullwhip        None\n\n        Define in which columns to look for missing values.\n\n        >>> df.dropna(subset=[\'name\', \'born\'])\n             name        toy        born\n        1  Batman  Batmobile  1940-04-25\n\n        Keep the DataFrame with valid entries in the same variable.\n\n        >>> df.dropna(inplace=True)\n        >>> df\n             name        toy        born\n        1  Batman  Batmobile  1940-04-25\n        '
    axis = validate_axis(axis)
    inplace = validate_bool_kwarg(inplace, 'inplace')
    if (thresh is None):
        if (how is None):
            raise TypeError('must specify how or thresh')
        elif (how not in ('any', 'all')):
            raise ValueError('invalid how option: {h}'.format(h=how))
    labels: Optional[List[Label]]
    if (subset is not None):
        if isinstance(subset, str):
            labels = [(subset,)]
        elif isinstance(subset, tuple):
            labels = [subset]
        else:
            labels = [(sub if isinstance(sub, tuple) else (sub,)) for sub in subset]
    else:
        labels = None
    if (axis == 0):
        if (labels is not None):
            invalids = [label for label in labels if (label not in self._internal.column_labels)]
            if (len(invalids) > 0):
                raise KeyError(invalids)
        else:
            labels = self._internal.column_labels
        cnt = reduce((lambda x, y: (x + y)), [F.when(self._psser_for(label).notna().spark.column, 1).otherwise(0) for label in labels], SF.lit(0))
        if (thresh is not None):
            pred = (cnt >= SF.lit(int(thresh)))
        elif (how == 'any'):
            pred = (cnt == SF.lit(len(labels)))
        elif (how == 'all'):
            pred = (cnt > SF.lit(0))
        internal = self._internal.with_filter(pred)
        if inplace:
            self._update_internal_frame(internal)
            return None
        else:
            return DataFrame(internal)
    else:
        assert (axis == 1)
        internal = self._internal.resolved_copy
        if (labels is not None):
            if any(((len(lbl) != internal.index_level) for lbl in labels)):
                raise ValueError('The length of each subset must be the same as the index size.')
            cond = reduce((lambda x, y: (x | y)), [reduce((lambda x, y: (x & y)), [(scol == SF.lit(part)) for (part, scol) in zip(lbl, internal.index_spark_columns)]) for lbl in labels])
            internal = internal.with_filter(cond)
        psdf: DataFrame = DataFrame(internal)
        null_counts = []
        for label in internal.column_labels:
            psser = psdf._psser_for(label)
            cond = psser.isnull().spark.column
            null_counts.append(F.sum(F.when((~ cond), 1).otherwise(0)).alias(name_like_string(label)))
        counts = internal.spark_frame.select((null_counts + [F.count('*')])).head()
        if (thresh is not None):
            column_labels = [label for (label, cnt) in zip(internal.column_labels, counts) if ((cnt or 0) >= int(thresh))]
        elif (how == 'any'):
            column_labels = [label for (label, cnt) in zip(internal.column_labels, counts) if ((cnt or 0) == counts[(- 1)])]
        elif (how == 'all'):
            column_labels = [label for (label, cnt) in zip(internal.column_labels, counts) if ((cnt or 0) > 0)]
        psdf = self[column_labels]
        if inplace:
            self._update_internal_frame(psdf._internal)
            return None
        else:
            return psdf
Remove missing values.

Parameters
----------
axis : {0 or 'index'}, default 0
    Determine if rows or columns which contain missing values are
    removed.

    * 0, or 'index' : Drop rows which contain missing values.
how : {'any', 'all'}, default 'any'
    Determine if row or column is removed from DataFrame, when we have
    at least one NA or all NA.

    * 'any' : If any NA values are present, drop that row or column.
    * 'all' : If all values are NA, drop that row or column.

thresh : int, optional
    Require that many non-NA values.
subset : array-like, optional
    Labels along other axis to consider, e.g. if you are dropping rows
    these would be a list of columns to include.
inplace : bool, default False
    If True, do operation inplace and return None.

Returns
-------
DataFrame
    DataFrame with NA entries dropped from it.

See Also
--------
DataFrame.drop : Drop specified labels from columns.
DataFrame.isnull: Indicate missing values.
DataFrame.notnull : Indicate existing (non-missing) values.

Examples
--------
>>> df = ps.DataFrame({"name": ['Alfred', 'Batman', 'Catwoman'],
...                    "toy": [None, 'Batmobile', 'Bullwhip'],
...                    "born": [None, "1940-04-25", None]},
...                   columns=['name', 'toy', 'born'])
>>> df
       name        toy        born
0    Alfred       None        None
1    Batman  Batmobile  1940-04-25
2  Catwoman   Bullwhip        None

Drop the rows where at least one element is missing.

>>> df.dropna()
     name        toy        born
1  Batman  Batmobile  1940-04-25

Drop the columns where at least one element is missing.

>>> df.dropna(axis='columns')
       name
0    Alfred
1    Batman
2  Catwoman

Drop the rows where all elements are missing.

>>> df.dropna(how='all')
       name        toy        born
0    Alfred       None        None
1    Batman  Batmobile  1940-04-25
2  Catwoman   Bullwhip        None

Keep only the rows with at least 2 non-NA values.

>>> df.dropna(thresh=2)
       name        toy        born
1    Batman  Batmobile  1940-04-25
2  Catwoman   Bullwhip        None

Define in which columns to look for missing values.

>>> df.dropna(subset=['name', 'born'])
     name        toy        born
1  Batman  Batmobile  1940-04-25

Keep the DataFrame with valid entries in the same variable.

>>> df.dropna(inplace=True)
>>> df
     name        toy        born
1  Batman  Batmobile  1940-04-25
def dropna(self, axis: Axis=0, how: str='any', thresh: Optional[int]=None, subset: Optional[Union[(Name, List[Name])]]=None, inplace: bool=False) -> Optional['DataFrame']:
    '\n        Remove missing values.\n\n        Parameters\n        ----------\n        axis : {0 or \'index\'}, default 0\n            Determine if rows or columns which contain missing values are\n            removed.\n\n            * 0, or \'index\' : Drop rows which contain missing values.\n        how : {\'any\', \'all\'}, default \'any\'\n            Determine if row or column is removed from DataFrame, when we have\n            at least one NA or all NA.\n\n            * \'any\' : If any NA values are present, drop that row or column.\n            * \'all\' : If all values are NA, drop that row or column.\n\n        thresh : int, optional\n            Require that many non-NA values.\n        subset : array-like, optional\n            Labels along other axis to consider, e.g. if you are dropping rows\n            these would be a list of columns to include.\n        inplace : bool, default False\n            If True, do operation inplace and return None.\n\n        Returns\n        -------\n        DataFrame\n            DataFrame with NA entries dropped from it.\n\n        See Also\n        --------\n        DataFrame.drop : Drop specified labels from columns.\n        DataFrame.isnull: Indicate missing values.\n        DataFrame.notnull : Indicate existing (non-missing) values.\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({"name": [\'Alfred\', \'Batman\', \'Catwoman\'],\n        ...                    "toy": [None, \'Batmobile\', \'Bullwhip\'],\n        ...                    "born": [None, "1940-04-25", None]},\n        ...                   columns=[\'name\', \'toy\', \'born\'])\n        >>> df\n               name        toy        born\n        0    Alfred       None        None\n        1    Batman  Batmobile  1940-04-25\n        2  Catwoman   Bullwhip        None\n\n        Drop the rows where at least one element is missing.\n\n        >>> df.dropna()\n             name        toy        born\n        1  Batman  Batmobile  1940-04-25\n\n        Drop the columns where at least one element is missing.\n\n        >>> df.dropna(axis=\'columns\')\n               name\n        0    Alfred\n        1    Batman\n        2  Catwoman\n\n        Drop the rows where all elements are missing.\n\n        >>> df.dropna(how=\'all\')\n               name        toy        born\n        0    Alfred       None        None\n        1    Batman  Batmobile  1940-04-25\n        2  Catwoman   Bullwhip        None\n\n        Keep only the rows with at least 2 non-NA values.\n\n        >>> df.dropna(thresh=2)\n               name        toy        born\n        1    Batman  Batmobile  1940-04-25\n        2  Catwoman   Bullwhip        None\n\n        Define in which columns to look for missing values.\n\n        >>> df.dropna(subset=[\'name\', \'born\'])\n             name        toy        born\n        1  Batman  Batmobile  1940-04-25\n\n        Keep the DataFrame with valid entries in the same variable.\n\n        >>> df.dropna(inplace=True)\n        >>> df\n             name        toy        born\n        1  Batman  Batmobile  1940-04-25\n        '
    axis = validate_axis(axis)
    inplace = validate_bool_kwarg(inplace, 'inplace')
    if (thresh is None):
        if (how is None):
            raise TypeError('must specify how or thresh')
        elif (how not in ('any', 'all')):
            raise ValueError('invalid how option: {h}'.format(h=how))
    labels: Optional[List[Label]]
    if (subset is not None):
        if isinstance(subset, str):
            labels = [(subset,)]
        elif isinstance(subset, tuple):
            labels = [subset]
        else:
            labels = [(sub if isinstance(sub, tuple) else (sub,)) for sub in subset]
    else:
        labels = None
    if (axis == 0):
        if (labels is not None):
            invalids = [label for label in labels if (label not in self._internal.column_labels)]
            if (len(invalids) > 0):
                raise KeyError(invalids)
        else:
            labels = self._internal.column_labels
        cnt = reduce((lambda x, y: (x + y)), [F.when(self._psser_for(label).notna().spark.column, 1).otherwise(0) for label in labels], SF.lit(0))
        if (thresh is not None):
            pred = (cnt >= SF.lit(int(thresh)))
        elif (how == 'any'):
            pred = (cnt == SF.lit(len(labels)))
        elif (how == 'all'):
            pred = (cnt > SF.lit(0))
        internal = self._internal.with_filter(pred)
        if inplace:
            self._update_internal_frame(internal)
            return None
        else:
            return DataFrame(internal)
    else:
        assert (axis == 1)
        internal = self._internal.resolved_copy
        if (labels is not None):
            if any(((len(lbl) != internal.index_level) for lbl in labels)):
                raise ValueError('The length of each subset must be the same as the index size.')
            cond = reduce((lambda x, y: (x | y)), [reduce((lambda x, y: (x & y)), [(scol == SF.lit(part)) for (part, scol) in zip(lbl, internal.index_spark_columns)]) for lbl in labels])
            internal = internal.with_filter(cond)
        psdf: DataFrame = DataFrame(internal)
        null_counts = []
        for label in internal.column_labels:
            psser = psdf._psser_for(label)
            cond = psser.isnull().spark.column
            null_counts.append(F.sum(F.when((~ cond), 1).otherwise(0)).alias(name_like_string(label)))
        counts = internal.spark_frame.select((null_counts + [F.count('*')])).head()
        if (thresh is not None):
            column_labels = [label for (label, cnt) in zip(internal.column_labels, counts) if ((cnt or 0) >= int(thresh))]
        elif (how == 'any'):
            column_labels = [label for (label, cnt) in zip(internal.column_labels, counts) if ((cnt or 0) == counts[(- 1)])]
        elif (how == 'all'):
            column_labels = [label for (label, cnt) in zip(internal.column_labels, counts) if ((cnt or 0) > 0)]
        psdf = self[column_labels]
        if inplace:
            self._update_internal_frame(psdf._internal)
            return None
        else:
            return psdf