def pop(self, item: Name) -> 'DataFrame':
    "\n        Return item and drop from frame. Raise KeyError if not found.\n\n        Parameters\n        ----------\n        item : str\n            Label of column to be popped.\n\n        Returns\n        -------\n        Series\n\n        Examples\n        --------\n        >>> df = ps.DataFrame([('falcon', 'bird', 389.0),\n        ...                    ('parrot', 'bird', 24.0),\n        ...                    ('lion', 'mammal', 80.5),\n        ...                    ('monkey','mammal', np.nan)],\n        ...                   columns=('name', 'class', 'max_speed'))\n\n        >>> df\n             name   class  max_speed\n        0  falcon    bird      389.0\n        1  parrot    bird       24.0\n        2    lion  mammal       80.5\n        3  monkey  mammal        NaN\n\n        >>> df.pop('class')\n        0      bird\n        1      bird\n        2    mammal\n        3    mammal\n        Name: class, dtype: object\n\n        >>> df\n             name  max_speed\n        0  falcon      389.0\n        1  parrot       24.0\n        2    lion       80.5\n        3  monkey        NaN\n\n        Also support for MultiIndex\n\n        >>> df = ps.DataFrame([('falcon', 'bird', 389.0),\n        ...                    ('parrot', 'bird', 24.0),\n        ...                    ('lion', 'mammal', 80.5),\n        ...                    ('monkey','mammal', np.nan)],\n        ...                   columns=('name', 'class', 'max_speed'))\n        >>> columns = [('a', 'name'), ('a', 'class'), ('b', 'max_speed')]\n        >>> df.columns = pd.MultiIndex.from_tuples(columns)\n        >>> df\n                a                 b\n             name   class max_speed\n        0  falcon    bird     389.0\n        1  parrot    bird      24.0\n        2    lion  mammal      80.5\n        3  monkey  mammal       NaN\n\n        >>> df.pop('a')\n             name   class\n        0  falcon    bird\n        1  parrot    bird\n        2    lion  mammal\n        3  monkey  mammal\n\n        >>> df\n                  b\n          max_speed\n        0     389.0\n        1      24.0\n        2      80.5\n        3       NaN\n        "
    result = self[item]
    self._update_internal_frame(self.drop(columns=item)._internal)
    return result
Return item and drop from frame. Raise KeyError if not found.

Parameters
----------
item : str
    Label of column to be popped.

Returns
-------
Series

Examples
--------
>>> df = ps.DataFrame([('falcon', 'bird', 389.0),
...                    ('parrot', 'bird', 24.0),
...                    ('lion', 'mammal', 80.5),
...                    ('monkey','mammal', np.nan)],
...                   columns=('name', 'class', 'max_speed'))

>>> df
     name   class  max_speed
0  falcon    bird      389.0
1  parrot    bird       24.0
2    lion  mammal       80.5
3  monkey  mammal        NaN

>>> df.pop('class')
0      bird
1      bird
2    mammal
3    mammal
Name: class, dtype: object

>>> df
     name  max_speed
0  falcon      389.0
1  parrot       24.0
2    lion       80.5
3  monkey        NaN

Also support for MultiIndex

>>> df = ps.DataFrame([('falcon', 'bird', 389.0),
...                    ('parrot', 'bird', 24.0),
...                    ('lion', 'mammal', 80.5),
...                    ('monkey','mammal', np.nan)],
...                   columns=('name', 'class', 'max_speed'))
>>> columns = [('a', 'name'), ('a', 'class'), ('b', 'max_speed')]
>>> df.columns = pd.MultiIndex.from_tuples(columns)
>>> df
        a                 b
     name   class max_speed
0  falcon    bird     389.0
1  parrot    bird      24.0
2    lion  mammal      80.5
3  monkey  mammal       NaN

>>> df.pop('a')
     name   class
0  falcon    bird
1  parrot    bird
2    lion  mammal
3  monkey  mammal

>>> df
          b
  max_speed
0     389.0
1      24.0
2      80.5
3       NaN
def pop(self, item: Name) -> 'DataFrame':
    "\n        Return item and drop from frame. Raise KeyError if not found.\n\n        Parameters\n        ----------\n        item : str\n            Label of column to be popped.\n\n        Returns\n        -------\n        Series\n\n        Examples\n        --------\n        >>> df = ps.DataFrame([('falcon', 'bird', 389.0),\n        ...                    ('parrot', 'bird', 24.0),\n        ...                    ('lion', 'mammal', 80.5),\n        ...                    ('monkey','mammal', np.nan)],\n        ...                   columns=('name', 'class', 'max_speed'))\n\n        >>> df\n             name   class  max_speed\n        0  falcon    bird      389.0\n        1  parrot    bird       24.0\n        2    lion  mammal       80.5\n        3  monkey  mammal        NaN\n\n        >>> df.pop('class')\n        0      bird\n        1      bird\n        2    mammal\n        3    mammal\n        Name: class, dtype: object\n\n        >>> df\n             name  max_speed\n        0  falcon      389.0\n        1  parrot       24.0\n        2    lion       80.5\n        3  monkey        NaN\n\n        Also support for MultiIndex\n\n        >>> df = ps.DataFrame([('falcon', 'bird', 389.0),\n        ...                    ('parrot', 'bird', 24.0),\n        ...                    ('lion', 'mammal', 80.5),\n        ...                    ('monkey','mammal', np.nan)],\n        ...                   columns=('name', 'class', 'max_speed'))\n        >>> columns = [('a', 'name'), ('a', 'class'), ('b', 'max_speed')]\n        >>> df.columns = pd.MultiIndex.from_tuples(columns)\n        >>> df\n                a                 b\n             name   class max_speed\n        0  falcon    bird     389.0\n        1  parrot    bird      24.0\n        2    lion  mammal      80.5\n        3  monkey  mammal       NaN\n\n        >>> df.pop('a')\n             name   class\n        0  falcon    bird\n        1  parrot    bird\n        2    lion  mammal\n        3  monkey  mammal\n\n        >>> df\n                  b\n          max_speed\n        0     389.0\n        1      24.0\n        2      80.5\n        3       NaN\n        "
    result = self[item]
    self._update_internal_frame(self.drop(columns=item)._internal)
    return result