Skip to content

Commit e64e327

Browse files
author
MomIsBestFriend
committed
Finished hashing.pyx
1 parent 4c3c6bd commit e64e327

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/_libs/hashing.pyx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def hash_object_array(object[:] arr, object key, object encoding='utf8'):
4747
k = <bytes>key.encode(encoding)
4848
kb = <uint8_t *>k
4949
if len(k) != 16:
50-
raise ValueError("key should be a 16-byte string encoded, "
51-
"got {key} (len {klen})".format(key=k, klen=len(k)))
50+
raise ValueError(f"key should be a 16-byte string encoded, "
51+
f"got {k} (len {len(k)})")
5252

5353
n = len(arr)
5454

@@ -67,9 +67,9 @@ def hash_object_array(object[:] arr, object key, object encoding='utf8'):
6767
data = <bytes>str(val).encode(encoding)
6868

6969
else:
70-
raise TypeError("{val} of type {typ} is not a valid type "
71-
"for hashing, must be string or null"
72-
.format(val=val, typ=type(val)))
70+
raise TypeError(f"{val} of type {type(val)} is not a valid type "
71+
f"for hashing, must be string or null"
72+
)
7373

7474
l = len(data)
7575
lens[i] = l

0 commit comments

Comments
 (0)