Skip to content

Commit c535042

Browse files
CLN: fixed formatting issues
1 parent 6d0899c commit c535042

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

pandas/core/frame.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4722,7 +4722,7 @@ def sort_values(
47224722
inplace=False,
47234723
kind="quicksort",
47244724
na_position="last",
4725-
key = None
4725+
key=None
47264726
):
47274727
inplace = validate_bool_kwarg(inplace, "inplace")
47284728
axis = self._get_axis_number(axis)
@@ -4805,7 +4805,7 @@ def sort_index(
48054805
labels = self._get_axis(axis)
48064806
if key is not None:
48074807
labels = labels.map(key)
4808-
4808+
48094809
# make sure that the axis is lexsorted to start
48104810
# if not we need to reconstruct to get the correct indexer
48114811
labels = labels._sort_levels_monotonic()

pandas/core/series.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2946,7 +2946,7 @@ def sort_values(
29462946
2 d
29472947
0 z
29482948
dtype: object
2949-
2949+
29502950
>>> s = pd.Series(['a', 'B', 'c', 'D', 'e'])
29512951
>>> s.sort_values()
29522952
1 B
@@ -3175,7 +3175,7 @@ def sort_index(
31753175
true_index = index
31763176
if key is not None:
31773177
index = index.map(key)
3178-
3178+
31793179
if level is not None:
31803180
new_index, indexer = index.sortlevel(
31813181
level, ascending=ascending, sort_remaining=sort_remaining

pandas/tests/series/test_sorting.py

-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ def test_sort_index_key_int(self, dtype):
198198
result = series.sort_index(key=lambda x: 2 * x)
199199
assert_series_equal(result, series)
200200

201-
202201
def test_sort_value_key(self):
203202
series = Series(np.array(["Hello", "goodbye"]))
204203

0 commit comments

Comments
 (0)