-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
get_indexer_non_unique for orderable indexes #15372
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
c1b657e
get_indexer_non_unique for orderable indexes
horta 2f971a2
BUG: Avoid grafting missing examples directory (#15373)
neirbowj 1bad601
CLN: remove pandas/io/auth.py, from ga.py (now removed) (#15374)
jreback 5fb5228
TST: consolidate remaining tests under pandas.tests
jreback 1bcc10d
TST: fix locations for github based url tests
jreback f87db63
DOC: fix path in whatsnew
jreback 1190ac6
TST: use xdist for multiple cpu testing
jreback 0915857
Typo (#15377)
andrewkittredge a0f7fc0
TST: control skipping of numexpr tests if its installed / used
jreback dda3c42
TST: make test_gbq single cpu
jreback 47f7ce3
C level list
horta 09dd91b
no gil
horta 010393c
ENH: expose Int64VectorData in hashtable.pxd
jreback d9e75c7
TST: xfail most test_gbq tests for now
jreback 2e55efc
capture index error
horta 6916dad
wrong exception handling
horta 86ca84d
TST: Fix gbq integration tests. gbq._Dataset.dataset() would not retu…
parthea ff0deec
Bug: Raise ValueError with interpolate & fillna limit = 0 (#9217)
mroeschke 5959fe1
CLN: create core/sorting.py
jreback 4b97db4
TST: disable gbq tests again
jreback 25fb173
TST: fix incorrect url in compressed url network tests in parser
jreback 03bb900
TST: incorrect skip in when --skip-network is run
jreback bbb583c
TST: fix test_nework.py fixture under py27
jreback 2372d27
BLD: Numexpr 2.4.6 required
b261dfe
TST: print skipped tests files
jreback e351ed0
PERF: high memory in MI
jreback 93f5e3a
STYLE: flake8 upgraded to 3.3 on conda (#15412)
jreback 86ef3ca
DOC: use shared_docs for Index.get_indexer, get_indexer_non_unique (#…
jreback d6f8b46
BLD: use latest conda version with latest miniconda installer on appv…
jreback f2246cf
TST: convert yield based test_pickle.py to parametrized to remove war…
jreback ddb22f5
TST: Parametrize simple yield tests
QuLogic 5a8883b
BUG: Ensure the right values are set in SeriesGroupBy.nunique
c7300ea
BUG: Concat with inner join and empty DataFrame
abaldenko 9b5d848
ENH: Added ability to freeze panes from DataFrame.to_excel() (#15160)
jeffcarey c588dd1
Documents touch-up for DataFrame.to_excel() freeze_panes option (#15436)
jeffcarey f4e672c
BUG: to_sql convert index name to string (#15404) (#15423)
redbullpeter 54b6c6e
DOC: add whatsnew for #15423
jorisvandenbossche 763f42f
TST: remove yielding tests from test_msgpacks.py (#15427)
jreback f65a641
ENH: Don't add rowspan/colspan if it's 1.
QuLogic a17a03a
DOC: correct rpy2 examples (GH15142) (#15450)
jorisvandenbossche 29aeffb
BUG: rolling not accepting Timedelta-like window args (#15443)
mroeschke be4a63f
BUG: testing on windows
jreback c7a1e00
get_indexer_non_unique for orderable indexes
horta 34545d4
Merge branch 'master' of https://github.com/Horta/pandas
horta 390bfb2
get_indexer_non_unique for orderable indexes
horta f38cf52
C level list
horta 9dabf34
no gil
horta f61b98f
capture index error
horta 6afb8c9
wrong exception handling
horta 5494a4c
Merge branch 'master' of https://github.com/Horta/pandas
horta bf4b3f5
fixed-size arrays for get_index mapping
horta 0f37a64
dtype=np.int64
horta 3c218ce
empty and zeros with np.int64
horta 74ce239
as array
horta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2509,7 +2509,18 @@ def get_indexer_non_unique(self, target): | |
else: | ||
tgt_values = target._values | ||
|
||
indexer, missing = self._engine.get_indexer_non_unique(tgt_values) | ||
try: | ||
if self.is_all_dates: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you just need to check |
||
idx0 = np.argsort(self.asi8, kind='mergesort') | ||
else: | ||
idx0 = np.argsort(self._values, kind='mergesort') | ||
|
||
idx1 = np.argsort(tgt_values, kind='mergesort') | ||
indexer, missing = self._engine.get_indexer_non_unique_orderable(tgt_values, idx0, idx1) | ||
|
||
except TypeError: | ||
indexer, missing = self._engine.get_indexer_non_unique(tgt_values) | ||
|
||
return Index(indexer), missing | ||
|
||
def get_indexer_for(self, target, **kwargs): | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Int64Vector
from https://github.com/pandas-dev/pandas/blob/master/pandas/src/hashtable_class_helper.pxi.in would be a much faster way to handle accumulating these arrays.