from copy import deepcopy
import inspect
import pydoc

import numpy as np
import pytest

import pandas.util._test_decorators as td
from pandas.util._test_decorators import (
    async_mark,
    skip_if_no,
)

import pandas as pd
from pandas import (
    DataFrame,
    Series,
    date_range,
    timedelta_range,
)
import pandas._testing as tm


class TestDataFrameMisc:
    def test_getitem_pop_assign_name(self, float_frame):
        s = float_frame["A"]
        assert s.name == "A"

        s = float_frame.pop("A")
        assert s.name == "A"

        s = float_frame.loc[:, "B"]
        assert s.name == "B"

        s2 = s.loc[:]