Skip to content

Conversation

@arw2019
Copy link
Contributor

@arw2019 arw2019 commented Jun 5, 2020

@MarcoGorelli
Copy link
Member

Thanks @arw2019

Could you add a test to show how this fixes the linked issue?

arw2019 and others added 2 commits June 5, 2020 21:44
Co-authored-by: Daniel Saxton <2658661+dsaxton@users.noreply.github.com>
@arw2019
Copy link
Contributor Author

arw2019 commented Jun 6, 2020

Could you add a test to show how this fixes the linked issue?

@MarcoGorelli Added the test just now. It's currently inside pandas/tests/indexing/multiindex/test_slice.py but I'll move it if there's a better location for it!

As an aside, I looked in both pandas/pandas/tests/indexes and pandas/pandas/tests/indexing and I couldn't find any other tests for DataFrame.truncate. Either here or in a separate pull request I'd be happy to add additional tests if people think it's a good idea!

@jreback jreback added Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex Bug labels Jun 8, 2020
@arw2019 arw2019 requested a review from jreback June 20, 2020 04:07
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, some comments, merge master and ping on green.


def test_truncate_multiindex_names(self):
# GH 34564

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this tests is duplicative can remove

@jreback jreback added this to the 1.1 milestone Jun 20, 2020
@jreback jreback merged commit 528148f into pandas-dev:master Jun 20, 2020
@jreback
Copy link
Contributor

jreback commented Jun 20, 2020

thanks @arw2019

@arw2019 arw2019 deleted the df-truncate-drops-multiindex-names branch June 21, 2020 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex

4 participants