Skip to content

Commit 8fd4b72

Browse files
committed
use f-strings
1 parent 6f9272a commit 8fd4b72

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/core/arrays/categorical.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,8 @@ def from_dummies(
478478
multicat_rows = row_totals > 1
479479
if multicat_rows.any():
480480
raise ValueError(
481-
"{} record(s) belongs to multiple categories: {}".format(
482-
multicat_rows.sum(),
483-
list(df.index[multicat_rows]),
484-
)
481+
f"{multicat_rows.sum()} record(s) belongs to multiple categories: "
482+
f"{list(df.index[multicat_rows])}"
485483
)
486484

487485
codes = Series(np.full(len(row_totals), np.nan), index=df.index, dtype="Int64")

0 commit comments

Comments
 (0)