Skip to content

Commit fe8f645

Browse files
committed
Changing lib.pyx to highlight an issue with astype_unicode (not a fix)
1 parent 4a20d5b commit fe8f645

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/_libs/lib.pyx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,10 @@ def astype_unicode(arr: ndarray, skipna: bool=False) -> ndarray[object]:
577577
for i in range(n):
578578
arr_i = arr[i]
579579

580-
if not (skipna and checknull(arr_i)):
581-
arr_i = unicode(arr_i)
580+
if checknull(arr_i):
581+
arr_i = "is_null"
582+
else:
583+
arr_i = "not_null"
582584

583585
result[i] = arr_i
584586

0 commit comments

Comments
 (0)