Skip to content
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

DOC: Incorrect whatsnew entry for GH6459 #6895

Closed
jorisvandenbossche opened this issue Apr 16, 2014 · 5 comments
Closed

DOC: Incorrect whatsnew entry for GH6459 #6895

jorisvandenbossche opened this issue Apr 16, 2014 · 5 comments
Labels
Milestone

Comments

@jorisvandenbossche
Copy link
Member

The whatsnew entry for PR #6459: http://pandas-docs.github.io/pandas-docs-travis/whatsnew.html at IPython input prompt 22, the example code is:

set_index no longer converts MultiIndexes to an Index of tuples. For example, the old behavior returned an Index in this case (GH6459):

In [22]: df_multi.index
Out[22]: 
MultiIndex(levels=[[u'a', u'b'], [u'c', u'd']],
           labels=[[0, 0, 1, 1], [0, 1, 0, 1]])

# Old behavior, casted MultiIndex to an Index
In [23]: df_multi.set_index(df_multi.index)
Out[23]: 
            0         1
a c  0.903672 -2.201395
  d  0.692797  0.016163
b c -0.315266  0.364278
  d -0.497458  0.531440

[4 rows x 2 columns]

# New behavior
In [24]: df_multi.set_index(df_multi.index)
Out[24]: 
            0         1
a c  0.903672 -2.201395
  d  0.692797  0.016163
b c -0.315266  0.364278
  d -0.497458  0.531440

[4 rows x 2 columns]

The 'old' and 'new' behaviour seems exactly the same, so it not clear what has changed.

@jorisvandenbossche jorisvandenbossche added this to the 0.14.0 milestone Apr 16, 2014
@jreback
Copy link
Contributor

jreback commented Apr 16, 2014

hmm maybe the old needs a code block or passing as_tuples=False (which replicates the old)

@jorisvandenbossche
Copy link
Member Author

BTW, there is some code suppressed: https://github.com/pydata/pandas/blob/master/doc/source/v0.14.0.txt#L164 (and I suppose this was meant to create the old/new behaviour)

@jreback
Copy link
Contributor

jreback commented Apr 16, 2014

hmm

I recall this WAS working correctly in the whatsnew maybe something just changed

@jorisvandenbossche
Copy link
Member Author

I suppose it is due to this: #4805 ?
The tuples are converted to a multi-index due to changes to the index constructor?

@jreback
Copy link
Contributor

jreback commented Apr 23, 2014

closed by this: d6241d8

I think was an error when I originally edited the v.0.14.0 notes

you can 'create' the old behavior by passing the internal argument tupleize_cols=False when creating an Index from tuples

@jreback jreback closed this as completed Apr 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants