-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix to_csv of DataFrame with single level multiindex. #19831
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19831 +/- ##
==========================================
- Coverage 92.21% 92.21% -0.01%
==========================================
Files 161 161
Lines 51173 51176 +3
==========================================
+ Hits 47190 47192 +2
- Misses 3983 3984 +1
Continue to review full report at Codecov.
|
Fixed the merge conflict, and the whatsnew note. Ping on green. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you rebase on master and will have a look
Hello @EricChea! Thanks for updating the PR.
|
@jreback @TomAugspurger : Addressed all comments. Everything is green except for the fact that https://travis-ci.org/pandas-dev/pandas/jobs/448750638#L2895 |
i thought the hypothesis stuff was fixed for timeout |
Display the level by itself instead of as a tuple (i.e. "squash" the MultiIndex into a single level) Closes gh-19589.
@jreback @TomAugspurger : Everything is green now. Maybe Travis was just acting up. PTAL. |
Gah, it's warning about the not-yet-enforced |
@Zac-HD : Indeed, that is what I suspect as well. If you could open a PR to make our tests more robust against this, that would be great! |
Display the level by itself instead of as a tuple (i.e. "squash" the MultiIndex into a single level) Closes pandas-devgh-19589.
Display the level by itself instead of as a tuple (i.e. "squash" the MultiIndex into a single level) Closes pandas-devgh-19589.
Display the level by itself instead of as a tuple (i.e. "squash" the MultiIndex into a single level) Closes pandas-devgh-19589.
What's this PR do?
Fixes the output of to_csv to show the value instead of the tuple when a
DataFrame
orSeries
is constructed using aMultiIndex
with one level. Although, I'm not sure if it's more desirable to require a MultiIndex to be instantiated with more than one level in the future.git diff upstream/master -u -- "*.py" | flake8 --diff