def dropna(self, axis=<NUM_LIT:0>, how='<STR_LIT>', inplace=False):
axis = self._get_axis_number(axis)<EOL>values = self.values<EOL>mask = notna(values)<EOL>for ax in reversed(sorted(set(range(self._AXIS_LEN)) - {axis})):<EOL><INDENT>mask = mask.sum(ax)<EOL><DEDENT>per_slice = np.prod(values.shape[:axis] + values.shape[axis + <NUM_LIT:1>:])<EOL>if how == '<STR_LIT:all>':<EOL><INDENT>cond = mask > <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>cond = mask == per_slice<EOL><DEDENT>new_ax = self._get_axis(axis)[cond]<EOL>result = self.reindex_axis(new_ax, axis=axis)<EOL>if inplace:<EOL><INDENT>self._update_inplace(result)<EOL><DEDENT>else:<EOL><INDENT>return result<EOL><DEDENT>
Drop 2D from panel, holding passed axis constant.

Parameters
----------
axis : int, default 0
    Axis to hold constant. E.g. axis=1 will drop major_axis entries
    having a certain amount of NA data
how : {'all', 'any'}, default 'any'
    'any': one or more values are NA in the DataFrame along the
    axis. For 'all' they all must be.
inplace : bool, default False
    If True, do operation inplace and return None.

Returns
-------
dropped : Panel