You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>>importsys>>>sys.version'3.6.1 |Continuum Analytics, Inc.| (default, Mar 22 2017, 19:25:17) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]'>>>a=np.arange(1, 5).reshape(2,2)
>>>spm=scipy.sparse.dok_matrix(a)
>>>pd.SparseDataFrame(spm)
01012134
Problem description
Initialization of SparseDataFrame with scipy.sparse.dok_matrix returns a different result from direct initialization from np.ndarray only in Python 2.7. This is inconsistent and unestimated behavior.
The scipy.sparse.dia_matrix shows similar buggy behavior.
Code Sample, a copy-pastable example if possible
Python 2.7
Python 3.6
Problem description
Initialization of SparseDataFrame with scipy.sparse.dok_matrix returns a different result from direct initialization from np.ndarray only in Python 2.7. This is inconsistent and unestimated behavior.
The scipy.sparse.dia_matrix shows similar buggy behavior.
Expected Output
Output of
pd.show_versions()
pandas: 0.20.0rc1+29.g075eca1
pytest: 3.0.7
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.12.1
scipy: 0.18.1
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: