Skip to content

Commit 8d122e6

Browse files
authored
PERF: use StringHashtable in data algos (#16128)
xref #16107
1 parent 8ab8ad0 commit 8d122e6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/core/algorithms.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,7 @@ def _get_data_algo(values, func_map):
216216

217217
# its cheaper to use a String Hash Table than Object
218218
if lib.infer_dtype(values) in ['string']:
219-
try:
220-
f = func_map['string']
221-
except KeyError:
222-
pass
219+
ndtype = 'string'
223220

224221
f = func_map.get(ndtype, func_map['object'])
225222

0 commit comments

Comments
 (0)