-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
to_frame() broken by RangeIndex #13557
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
Comments
Looks to be a repr issue related to
want to do a PR? |
@sinhrks Thank you for asking. I'm unfamiliar with the Pandas source, and would need some hand holding on tackling this. Note that as an occasional Pandas user, training me up may be an inefficient use of our time. Nevertheless, am willing. |
@sinhrks I suspect its more involved than simply repr, because...
|
Should be related to truncated repr.
|
Found it works on 0.18.1 and latest master (sorry i used older env at first). Must be the same as #12893. Pls update to 0.18.1 and see the result. |
Uh oh!
There was an error while loading. Please reload this page.
Code Sample, a copy-pastable example if possible
In [1]: import pandas as pd
In [2]: import numpy as np
In [3]: p = pd.Panel(np.arange(512).reshape((8,8,8)))
In [4]: p.to_frame()
Out[4]: <repr(<pandas.core.frame.DataFrame at 0x7fcd99f25590>) failed: TypeError: data type "major" not understood>
In [5]: p.axes
Out[5]:
[RangeIndex(start=0, stop=8, step=1),
RangeIndex(start=0, stop=8, step=1),
RangeIndex(start=0, stop=8, step=1)]
Issue is similar to Related TypeErrors in multi-indexed DataFrame #12893
Expected Output
Similar to this...
In [6]: p = pd.Panel(np.arange(8).reshape((2,2,2)))
In [7]: p.to_frame()
Out[7]:
In [8]: p.axes
Out[8]:
[RangeIndex(start=0, stop=2, step=1),
RangeIndex(start=0, stop=2, step=1),
RangeIndex(start=0, stop=2, step=1)]
output of
pd.show_versions()
In [9]: pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.12.candidate.1
python-bits: 64
OS: Linux
OS-release: 4.5.0-2-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.0+git114-g6c692ae
nose: 1.3.7
pip: None
setuptools: 20.10.1
Cython: None
numpy: 1.11.1rc1
scipy: 0.17.1
statsmodels: 0.6.1
xarray: None
IPython: 2.4.1
sphinx: None
patsy: 0.4.1
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: None
tables: 3.2.2
numexpr: 2.6.0
matplotlib: 1.5.2rc2
openpyxl: 2.3.0
xlrd: 0.9.4
xlwt: 0.7.5
xlsxwriter: None
lxml: 3.6.0
bs4: 4.4.1
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: