-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
pivot_table produces inconsistent columns if applied to empty table #21932
Labels
Comments
Indeed, that does look a little odd! Perhaps a corner case? cc @jreback |
Looks to work on master now. Could use a test
|
mroeschke
added
good first issue
Needs Tests
Unit test(s) needed to prevent regressions
and removed
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
labels
Jun 20, 2021
Is anyone working on it? I can take this. @mroeschke |
Go for it @FaazAbidi |
take |
@mroeschke I think this test belongs to tests.frame.test_repr_info.py. Can you confirm? |
Probably |
26 tasks
take |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code Sample, a copy-pastable example if possible
Problem description
In the first example, I don't expect to see any multiindex in
.columns
, as exactly one value for columns is provided. As we don't have any data, and it is not possible to figure out thedtype
of this index, one can probably assume it's something likeIndex([], name='b')
.Output of
pd.show_versions()
pandas: 0.23.3
pytest: None
pip: 10.0.1
setuptools: 39.2.0
Cython: None
numpy: 1.14.5
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 6.4.0
sphinx: None
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.2.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 1.0.1
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: