Skip to content

Fix rename for MultiIndex columns DataFrame #4004

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

Merged
merged 2 commits into from
Jun 24, 2013
Merged

Fix rename for MultiIndex columns DataFrame #4004

merged 2 commits into from
Jun 24, 2013

Conversation

ogiaquino
Copy link
Contributor

DataFrame rename doesn't rename a MultiIndex column and it flattens the columns. Closes #3165 which is a fix for index but not columns.

@jreback
Copy link
Contributor

jreback commented Jun 23, 2013

can u hook up to Travis?
instructions in contributing.md in main dir

also pls add a release notes mention

@ogiaquino
Copy link
Contributor Author

Okay I think I've hooked it up to Travis. Do I have to run manual build?

@jreback
Copy link
Contributor

jreback commented Jun 23, 2013

push another commit or

git commit --amend -C HEAD (will reset the latest coit hash)

then

git push yourfork yourbranch -f

then Travis will build it

@ogiaquino
Copy link
Contributor Author

Should I add the release note mention here? doc/source/v0.11.1.txt

@jreback
Copy link
Contributor

jreback commented Jun 23, 2013

release notes in doc/source/release.rst

@jreback
Copy link
Contributor

jreback commented Jun 23, 2013

ok...looks fine, except need to rebase, don't want to have those Merge branch in there....

git checkout yourbranch
git rebase -i

and remove the offending commit (just delete it) 05bd8618ab21701f7067969e84c9200c88ed4848

also prob want to s squash commits together

then

git push yourfork yourbranch -f

will rewrite this branch

@ogiaquino
Copy link
Contributor Author

Sorry I'm still learning git, I hope I did your last instruction right, but I'm lost with deleting the commit Merge branch.
When I do git rebase -i the offending merge commit is not even there, I just proceeded with squashing, and after saving git log doesn't show the merge commit anymore.

@brandonkane
Copy link

Thanks for the fix, I ran into the same problem today and was about to start on a fix but you beat me to it. :)

I have tested your code and it works as expected for me, matching the functionality for indexes already put in by 3165.

Let me know if there is anything I can do to help.

@hayd
Copy link
Contributor

hayd commented Jun 24, 2013

@ogiaquino it looks like you rebased successfully, good work!

hayd added a commit that referenced this pull request Jun 24, 2013
…umns_DataFrame

Fix rename for MultiIndex columns DataFrame
@hayd hayd merged commit d7fe745 into pandas-dev:master Jun 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename in MultiIndex flattens index
4 participants