DataFrame accessors can be overridden by column names (original) (raw)

I don't think we want this

In [1]: import pandas as pd

In [2]: df = pd.DataFrame({"sparse": [1, 2], "b": pd.SparseArray([1, 2])}) /Users/taugspurger/.virtualenvs/pandas-dev/bin/ipython:1: FutureWarning: The pandas.SparseArray class is deprecated and will be removed from pandas in a future version. Use pandas.arrays.SparseArray instead. #!/Users/taugspurger/Envs/pandas-dev/bin/python

In [3]: df.sparse Out[3]: 0 1 1 2 Name: sparse, dtype: int64

That should instead return the accessor.