Skip to content

Commit 3fb43a9

Browse files
committed
Changing lib.pyx to highlight an issue with astype_unicode (not a fix)
1 parent 39b3c2a commit 3fb43a9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/_libs/lib.pyx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def astype_intsafe(ndarray[object] arr, new_dtype):
552552

553553
@cython.wraparound(False)
554554
@cython.boundscheck(False)
555-
def astype_unicode(arr: ndarray, skipna: bool=False) -> ndarray[object]:
555+
def astype_unicode(arr: ndarray, skipna: bool=True) -> ndarray[object]:
556556
"""
557557
Convert all elements in an array to unicode.
558558

@@ -574,6 +574,9 @@ def astype_unicode(arr: ndarray, skipna: bool=False) -> ndarray[object]:
574574
Py_ssize_t i, n = arr.size
575575
ndarray[object] result = np.empty(n, dtype=object)
576576

577+
# BUG skipna should be True but it is not
578+
print(f'skipna value: {skipna}')
579+
577580
for i in range(n):
578581
arr_i = arr[i]
579582

0 commit comments

Comments
 (0)