Spyder: Variable explorer showing different format when using MultiIndex

Created on 8 Sep 2017  路  6Comments  路  Source: spyder-ide/spyder

Description of your problem

I was following the tutorial http://pbpython.com/pandas-pivot-table-explained.html

**What is the expected output?
In the part where
pd.pivot_table(df,index=["Name","Rep","Manager"])
image

What do you see instead?**

image

Please provide any additional information below

Versions and main components

  • Spyder Version: 3.2
  • Python Version: Python 3.5.3 |Intel Corporation| (default, Apr 27 2017, 17:03:30) [MSC v.1900 64 bit (AMD64)]
  • Qt Version: 5.6.2
  • PyQt Version: 5.6.0
  • Operating system: Windows 10

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

IPython >=4.0 : 5.3.0 (OK)
cython >=0.21 : 0.25.2 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
nbconvert >=4.0 : 5.1.1 (OK)
numpy >=1.7 : 1.12.1 (OK)
pandas >=0.13.1 : 0.20.1 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pyflakes >=0.6.0 : 1.5.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.6.4 (OK)
qtconsole >=4.2.0: 4.3.0 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.6.2 (OK)
sympy >=0.7.3 : None (NOK)

Variable Explorer Enhancement

All 6 comments

Thanks for reporting.

@dalthviz, does your Multiindex work fix this?

@ccordoba12 Maybe I will have to do some adjustments but this is a preview with my local version:

imagen

@dalthviz, this looks really good. The only thing missing is to use the index names in the header of our viewer (instead of showing Index Index Index).

So I'm marking this for beta2, so you work on that improvement after we merge your MultiIndex PR.

There is an open issue (#3591) regarding the named index for all types of indexes (not only MultiIndex). Maybe this could be part of a dedicated PR in order to also include "simple" indexes?

Thanks @Prikers for noticing it! I've also assigned @dalthviz to that issue, but I think both issues can be solved in a single PR.

@obgeneralao, a fix for this issue will be available in Spyder 4.

Was this page helpful?
0 / 5 - 0 ratings