-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SparseArray not in arrays module - inconsistent with IntegerArray, StringArray, etc. #30642
Comments
Sparse is incorrect and somewhat legacy all things should be at pandas.array level to avoid polluting the main namespace so need to deprecate from the main namespace |
@jreback I searched for an issue and couldn't find it. So if we deprecate now, does that mean we A. keep I'm willing to do this once #30628 is merged to master (should be green pretty soon) |
deprecate pd.SparseArray, fix all docs to point to pandas.array.SparseArray |
Reopening to track my comment in the PR: #30656 (comment) (so we have an issue with the correct milestone) |
Do we need to revert #30656 until the deprecation for Py37 and earlier is fixed? |
@TomAugspurger I should have a fix within a few hours. |
Great, thanks!
…On Tue, Jan 7, 2020 at 9:10 AM Irv Lustig ***@***.***> wrote:
Do we need to revert #30656
<#30656> until the deprecation
for Py37 and earlier is fixed?
@TomAugspurger <https://github.com/TomAugspurger> I should have a fix
within a few hours.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30642?email_source=notifications&email_token=AAKAOIUCUQ7JWYSOT7W5C5LQ4SLO7A5CNFSM4KCM2ET2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIJFO2I#issuecomment-571627369>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKAOIVSZFHRWANOGIYHG2LQ4SLO7ANCNFSM4KCM2ETQ>
.
|
Code Sample, a copy-pastable example if possible
Problem description
I discovered this while working on #30628 . The docs for
SparseArray
are at the top level (https://dev.pandas.io/docs/reference/api/pandas.SparseArray.html), while the docs forIntegerArray
(https://dev.pandas.io/docs/reference/api/pandas.arrays.IntegerArray.html),StringArray
(https://dev.pandas.io/docs/reference/api/pandas.arrays.StringArray.html), etc. are at thepandas.arrays
level.In the code
SparseArray
is at both levels, butIntegerArray
,StringArray
, etc. is only at thearrays
level.Expected Output
Unsure.
It seems that this should be consistent. Options are:
*Array
classes at top level, and document them that way. (i.e., use the pattern currently used forSparseArray
). That would involve code and documentation changes for all of the arrays exceptSparseArray
.*Array
classes at both levels (likeSparseArray
), but document them at thepandas.arrays
level (likeIntegerArray
andStringArray
). That would involve code changes for all of the arrays, and doc changes forSparseArray
.*Array
classes only at thepandas.arrays
level and document them all that way. That would involve only changing code and docs forSparseArray
and leaving the others alone.It's not clear to me which is preferred.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 1feefc6
python : 3.7.3.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 0.26.0.dev0+1563.g1feefc692
numpy : 1.17.4
pytz : 2019.3
dateutil : 2.8.1
pip : 19.3.1
setuptools : 42.0.2.post20191203
Cython : 0.29.14
pytest : 5.3.2
hypothesis : 4.54.2
sphinx : 2.3.0
blosc : None
feather : None
xlsxwriter : 1.2.6
lxml.etree : 4.4.2
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : 7.10.2
pandas_datareader: None
bs4 : 4.8.1
bottleneck : 1.3.1
fastparquet : None
gcsfs : None
lxml.etree : 4.4.2
matplotlib : 3.1.1
numexpr : 2.7.0
odfpy : None
openpyxl : 3.0.2
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.3.2
s3fs : None
scipy : 1.3.2
sqlalchemy : 1.3.11
tables : 3.6.1
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.6
numba : 0.46.0
The text was updated successfully, but these errors were encountered: