We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
bug in pandas version 0.18.0 (long time ago seemingly same issue has been reported on StackOverflow):
In[1]: import pandas as pd ...: import numpy as np ...: iterables = [['bar', 'baz', 'foo', 'qux'], ['one', 'two']] ...: index = pd.MultiIndex.from_product(iterables, names=['first', 'second']) ...: df = pd.DataFrame(np.random.randn(3, 8), index=['A', 'B', 'C'], columns=index) ...: df2 = df.drop('bar', axis=1)
At first sight, bar seems dropped from the dataframe:
In[2]: df2 Out[2]: first baz foo qux second one two one two one two A -0.625880 0.154829 -0.416494 -1.423776 0.942012 -1.495733 B -0.704217 0.132563 1.382712 -0.123216 1.773185 1.530121 C 0.925705 -0.702249 0.113887 -0.307644 0.369242 -0.798391
Though not completely, as 'bar' is still listed in the columns:
In[3]: df2.columns Out[3]: MultiIndex(levels=[[u'bar', u'baz', u'foo', u'qux'], [u'one', u'two']], labels=[[1, 1, 2, 2, 3, 3], [0, 1, 0, 1, 0, 1]], names=[u'first', u'second'])
The text was updated successfully, but these errors were encountered:
I discovered issue #3686 just now...
Sorry, something went wrong.
dupe of #2770 not a bug. you are pearing into the implementation.
@kdebrab have figured any workaround to this issue ?
No branches or pull requests
bug in pandas version 0.18.0 (long time ago seemingly same issue has been reported on StackOverflow):
At first sight, bar seems dropped from the dataframe:
Though not completely, as 'bar' is still listed in the columns:
The text was updated successfully, but these errors were encountered: