DataFrame accessors can be overridden by column names · Issue #30758 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
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.