We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00d3bbb commit 4b2bb50Copy full SHA for 4b2bb50
pandas/core/indexes/multi.py
@@ -2864,7 +2864,7 @@ def insert_level(
2864
2865
if all(val is None for val in value):
2866
new_level = Index([], dtype="object")
2867
- new_codes = [-1] * len(value)
+ new_codes = np.full(len(value), -1, dtype=np.intp)
2868
else:
2869
new_codes, new_level = factorize_from_iterable(value)
2870
0 commit comments