DataFrame accessors can be overridden by column names · Issue #30758 · pandas-dev/pandas (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- 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.