Skip to content

Commit 9fe4cbb

Browse files
donehowerWillAyd
authored andcommitted
f strings in core/sorting (#30028)
1 parent 80a4156 commit 9fe4cbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/sorting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def lexsort_indexer(keys, orders=None, na_position="last"):
208208
cat = Categorical(key, ordered=True)
209209

210210
if na_position not in ["last", "first"]:
211-
raise ValueError(f"invalid na_position: {repr(na_position)}")
211+
raise ValueError(f"invalid na_position: {na_position}")
212212

213213
n = len(cat.categories)
214214
codes = cat.codes.copy()
@@ -264,7 +264,7 @@ def nargsort(items, kind="quicksort", ascending: bool = True, na_position="last"
264264
elif na_position == "first":
265265
indexer = np.concatenate([nan_idx, indexer])
266266
else:
267-
raise ValueError(f"invalid na_position: {repr(na_position)}")
267+
raise ValueError(f"invalid na_position: {na_position}")
268268
return indexer
269269

270270

0 commit comments

Comments
 (0)