Skip to content

Commit 14c0264

Browse files
donehowerproost
authored andcommitted
f strings in core/sorting (pandas-dev#30028)
1 parent 977eb49 commit 14c0264

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/sorting.py

+2-2
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)