Unstacking float16 with missing levels throws AttributeError #24445
Labels
Dtype Conversions
Unexpected or buggy dtype conversions
Duplicate Report
Duplicate issue or pull request
Code Sample, a copy-pastable example if possible
Problem description
This raises an AttributeError:
AttributeError Traceback (most recent call last)
in ()
----> 1 ex.unstack(level=0)
/Users/nate/anaconda2/envs/petinsight/lib/python2.7/site-packages/pandas/core/frame.pyc in unstack(self, level, fill_value)
5532 """
5533 from pandas.core.reshape.reshape import unstack
-> 5534 return unstack(self, level, fill_value)
5535
5536 _shared_docs['melt'] = ("""
/Users/nate/anaconda2/envs/petinsight/lib/python2.7/site-packages/pandas/core/reshape/reshape.pyc in unstack(obj, level, fill_value)
493 if isinstance(obj, DataFrame):
494 if isinstance(obj.index, MultiIndex):
--> 495 return _unstack_frame(obj, level, fill_value=fill_value)
496 else:
497 return obj.T.stack(dropna=False)
/Users/nate/anaconda2/envs/petinsight/lib/python2.7/site-packages/pandas/core/reshape/reshape.pyc in _unstack_frame(obj, level, fill_value)
514 fill_value=fill_value,
515 constructor=obj._constructor)
--> 516 return unstacker.get_result()
517
518
/Users/nate/anaconda2/envs/petinsight/lib/python2.7/site-packages/pandas/core/reshape/reshape.pyc in get_result(self)
182
183 def get_result(self):
--> 184 values, _ = self.get_new_values()
185 columns = self.get_new_columns()
186 index = self.get_new_index()
/Users/nate/anaconda2/envs/petinsight/lib/python2.7/site-packages/pandas/core/reshape/reshape.pyc in get_new_values(self)
246
247 # fill in our values & mask
--> 248 f = getattr(reshape, "unstack{name}".format(name=name))
249 f(sorted_values,
250 mask.view('u1'),
AttributeError: 'module' object has no attribute 'unstack_float16'
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: None
python: 2.7.15.final.0
python-bits: 64
OS: Darwin
OS-release: 18.2.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.23.4
pytest: 3.8.0
pip: 10.0.1
setuptools: 40.2.0
Cython: 0.28.5
numpy: 1.15.1
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 5.8.0
sphinx: 1.7.9
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.5
blosc: 1.5.1
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.8
feather: None
matplotlib: 2.2.3
openpyxl: 2.5.6
xlrd: 1.1.0
xlwt: 1.2.0
xlsxwriter: 1.1.0
lxml: 4.2.5
bs4: 4.6.3
html5lib: 1.0.1
sqlalchemy: 1.2.11
pymysql: None
psycopg2: 2.7.6.1 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: