Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
076061b
BUG: attempt initial fix
AlexKirko Aug 7, 2020
3fa9351
TST: add test
AlexKirko Aug 7, 2020
333c6e4
CLN: run black
AlexKirko Aug 7, 2020
8414fd0
CLN: clean up unnecessary print
AlexKirko Aug 7, 2020
fa12898
exempt MultiIndex from handling missing values
AlexKirko Aug 7, 2020
e2575c9
CLN: run black
AlexKirko Aug 7, 2020
4293e22
add na_position kwarg to sort_values
AlexKirko Aug 10, 2020
275067e
debug na_position logic in sort_values
AlexKirko Aug 10, 2020
098fe10
CLN: fix na_position type
AlexKirko Aug 10, 2020
f0d4c2d
DOC: mv to 1.2.0 since API is changed
AlexKirko Aug 10, 2020
743eca6
DOC: make the comment more specific
AlexKirko Aug 11, 2020
9d17d7a
TST: parametrize the test, add raise check
AlexKirko Aug 11, 2020
744e5c1
CLN: run black
AlexKirko Aug 11, 2020
13fcd94
CLN: fix versionadded
AlexKirko Aug 11, 2020
33b02da
CLN: move na_position before key
AlexKirko Aug 13, 2020
73cc94c
DOC: add comment for MultiIndex
AlexKirko Aug 13, 2020
153fb06
REFACT: switch to nargsort from sorting.py
AlexKirko Aug 13, 2020
3481b81
reverse equal els in nargsort of ascending is False
AlexKirko Aug 13, 2020
9d92ddd
switch Series to nargsort
AlexKirko Aug 13, 2020
7ec9e7e
Revert "reverse equal els in nargsort of ascending is False"
AlexKirko Aug 13, 2020
2d16b8d
add TypeError to exception catch in nargsort
AlexKirko Aug 13, 2020
8939040
reverse equal els order in nargsort (again)
AlexKirko Aug 13, 2020
066f0af
CLN: isort test_datetime.py
AlexKirko Aug 15, 2020
7e351cd
keep equal el order in nargsort (again)
AlexKirko Aug 15, 2020
79ed8ee
add equals_reversible to nargsort and a debugging branch
AlexKirko Aug 15, 2020
62268e8
CLN: remove debug code
AlexKirko Aug 15, 2020
5cab3d4
CLN: remove extra newline in test_datetime
AlexKirko Aug 15, 2020
30ac949
CLN: alter test_ops to preserve equal element order
AlexKirko Aug 15, 2020
0ac0a3c
CLN: run black
AlexKirko Aug 15, 2020
051c3e7
revert changes to Series and connected tests
AlexKirko Aug 21, 2020
dfdee40
reimplement test fix for Index.sort_values
AlexKirko Aug 21, 2020
acf6170
TST: don't expect same indexer for Index and PeriodIndex
AlexKirko Aug 21, 2020
4b43852
TST: add Index types, switch to fixture
AlexKirko Aug 25, 2020
fb8f703
CLN: fix import order
AlexKirko Aug 25, 2020
fc58c3f
TST: add test for Index and PeriodIndex incompatibility
AlexKirko Aug 25, 2020
1dfd4f2
TST: move fixture to pandas/conftest.py
AlexKirko Aug 27, 2020
65c001a
TST: add na_position=None test case
AlexKirko Aug 27, 2020
dd82cc1
TST: move index type xfails to test_common.py
AlexKirko Aug 27, 2020
a3855ad
DOC: remove unnecessary comment in test_ops
AlexKirko Aug 27, 2020
481de59
DOC: add xref to unstable sort issue
AlexKirko Aug 27, 2020
c7e8240
TST: add prints to debug numpy dev test fails
AlexKirko Aug 31, 2020
ad29fff
Revert "TST: add prints to debug numpy dev test fails"
AlexKirko Aug 31, 2020
6ae6e8a
restart tests
AlexKirko Sep 2, 2020
213b13b
Merge branch 'master' into ind-sort-values
AlexKirko Sep 2, 2020
760bda1
DOC: remove junk from whatsnew
AlexKirko Sep 2, 2020
d8f9061
TST: warp test for debug
AlexKirko Sep 2, 2020
2f8bec6
Revert "TST: warp test for debug"
AlexKirko Sep 2, 2020
29d6849
remove new tests for debug
AlexKirko Sep 2, 2020
8b81e55
Revert "remove new tests for debug"
AlexKirko Sep 3, 2020
5b2a0d3
TST: try deep copy in fixture
AlexKirko Sep 3, 2020
a3310ba
TST: try immediate return instead of deep copy
AlexKirko Sep 3, 2020
e80bc9d
Revert "TST: try immediate return instead of deep copy"
AlexKirko Sep 3, 2020
2007699
REFACT: add immediate returns
AlexKirko Sep 3, 2020
8fd5a77
Merge branch 'master' into ind-sort-values
AlexKirko Sep 3, 2020
2e39294
DOC: add comment to conftest clarifying deep copy
AlexKirko Sep 3, 2020
d78a9a2
restart tests
AlexKirko Sep 3, 2020
5715c31
Merge branch 'master' into ind-sort-values
AlexKirko Sep 3, 2020
bfd2e9c
CLN: remove test-output.xml
AlexKirko Sep 3, 2020
54a6e82
TST: check for MultiIndex through request.param
AlexKirko Sep 5, 2020
f60d2a8
CLN: revert changes to nargsort
AlexKirko Sep 5, 2020
af92fe8
DOC: add issue xref to xfail reason in period/test_ops.py
AlexKirko Sep 5, 2020
6d33657
DOC: clarify xfail reasons and add comments
AlexKirko Sep 5, 2020
4935309
REFACT: switch to isinstance, add blank line
AlexKirko Sep 6, 2020
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
Next Next commit
BUG: attempt initial fix
  • Loading branch information
AlexKirko committed Aug 31, 2020
commit 076061bd7cb506f7f7863cd6e2dcc67d68c2cb9b
10 changes: 8 additions & 2 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4441,9 +4441,15 @@ def sort_values(
"""
idx = ensure_key_mapped(self, key)

_as = idx.argsort()
# GH 35584. Place missing values at the end of sorted Index,
# same as Series.sort_values
bad = isna(idx)
good = ~bad
_as = np.arange(len(idx), dtype=np.int64)
_as = np.concatenate([_as[good][idx[good].argsort()], _as[bad]])

if not ascending:
_as = _as[::-1]
_as[:np.sum(good)] = _as[:np.sum(good)][::-1]

sorted_index = self.take(_as)

Expand Down
1 change: 1 addition & 0 deletions pandas/core/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def aggregate(self, func, *args, **kwargs):
self._set_binner()
result, how = self._aggregate(func, *args, **kwargs)
if result is None:
print("Here")
how = func
grouper = None
result = self._groupby_and_aggregate(how, grouper, *args, **kwargs)
Expand Down