Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
BUG: .loc with duplicated label may have incorrect index dtype #11497
Conversation
sinhrks
added Bug Indexing
labels
Nov 1, 2015
sinhrks
added this to the
0.17.1
milestone
Nov 1, 2015
jreback
commented on an outdated diff
Nov 1, 2015
| @@ -2160,7 +2160,13 @@ def _reindex_non_unique(self, target): | ||
| new_indexer = np.arange(len(self.take(indexer))) | ||
| new_indexer[~check] = -1 | ||
| - return self._shallow_copy(new_labels), indexer, new_indexer | ||
| + attrs = self._get_attributes_dict() | ||
| + # non-unique slicing must reset freq | ||
| + attrs.pop('freq', None) | ||
| + try: | ||
| + return self._constructor(new_labels, **attrs), indexer, new_indexer |
|
|
sinhrks
referenced
this pull request
Nov 7, 2015
Open
BUG/API: Clarify the behaviour of fillna downcasting #11537
jreback
and 1 other
commented on an outdated diff
Nov 7, 2015
| @@ -382,6 +390,8 @@ def _shallow_copy(self, values=None, infer=False, **kwargs): | ||
| values : the values to create the new Index, optional | ||
| infer : boolean, default False | ||
| if True, infer the new type of the passed values | ||
| + reset_attributes : boolean, default False | ||
| + if True, reset attributes specified in _reset_attributes | ||
| kwargs : updates the default attributes for this Index |
sinhrks
Member
|
|
Updated and now green. |
jreback
and 1 other
commented on an outdated diff
Nov 7, 2015
| @@ -391,6 +395,11 @@ def _shallow_copy(self, values=None, infer=False, **kwargs): | ||
| if infer: | ||
| attributes['copy'] = False | ||
| + if self._infer_as_myclass: |
jreback
Contributor
|
sinhrks
referenced
this pull request
Nov 13, 2015
Merged
TST: Enable Index dtype comparison by default #11588
|
@sinhrks can you update |
jreback
modified the milestone: Next Major Release, 0.17.1
Nov 14, 2015
|
@sinhrks yeh, prob requires some playing around to get this to work nicely. Like your separation of concerns though. We should document this prob at top of core/index.py |
|
How about adding
We can replace If OK, I'll squash. |
sinhrks
modified the milestone: 0.18.0, Next Major Release
Nov 24, 2015
MaximilianR
referenced
this pull request
Nov 24, 2015
Closed
BUG: Index does not inherit existing Index or DatatetimeIndex object … #11695
|
@sinhrks seems reasonable call it |
|
@jreback OK, renamed. Also added general explanation about |
jreback
added a commit
that referenced
this pull request
Nov 29, 2015
|
|
jreback |
431e224
|
jreback
merged commit 431e224
into pandas-dev:master
Nov 29, 2015
1 check passed
|
thanks @sinhrks and nice docs! |
sinhrks commentedNov 1, 2015
.locresult with duplicated keys may have incorredIndexdtype.After the PR:
Above OK results are unchanged.