Skip to content

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jun 16, 2015

Closes #10115. Closes #10116.

Based on @seth-p and @jreback 's fix, added tets for datetime-likes.

@sinhrks sinhrks added Bug Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex labels Jun 16, 2015
@sinhrks sinhrks added this to the 0.17.0 milestone Jun 16, 2015
@sinhrks sinhrks force-pushed the drop_duplicates_names branch 3 times, most recently from 35f10ab to acddfaa Compare June 20, 2015 22:58
@sinhrks sinhrks force-pushed the drop_duplicates_names branch from acddfaa to 60a6e9f Compare June 20, 2015 22:59
@sinhrks
Copy link
Member Author

sinhrks commented Jun 22, 2015

@jreback could you review this, as this will be the base of #10236 and #10150 (adding names to all test cases)

self.assertIsNone(idx_dup.freq) # freq is reset
result = idx_dup.drop_duplicates()
self.assert_index_equal(idx, result)
self.assertIsNone(result.freq)
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm I think that these tests are in test_index.py (there is of course some duplication, pardon the pun, with where tests live for these sub-classes).

Copy link
Member Author

Choose a reason for hiding this comment

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

I intended these tests are for freq rather than name, because name are tested in test_index. Maybe assert_index_equal should check all metadata to simplify the test (I've once tried and found some tests / logics must be fixed).

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, that's fine then.

@jreback
Copy link
Contributor

jreback commented Jun 22, 2015

lgtm. ideally let's try to group tests that work across ALL sub-classes in test_index, and leave timeseries specific ones in tseries/test_base

@jreback
Copy link
Contributor

jreback commented Jun 23, 2015

merge when ready

sinhrks added a commit that referenced this pull request Jun 23, 2015
BUG: drop_duplicates drops name(s).
@sinhrks sinhrks merged commit 30197b5 into pandas-dev:master Jun 23, 2015
@sinhrks
Copy link
Member Author

sinhrks commented Jun 23, 2015

Thank for review:)

@sinhrks sinhrks deleted the drop_duplicates_names branch June 23, 2015 14:12
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: MultiIndex.drop_duplicates() drops names
2 participants