Skip to content

Commit 0a3846f

Browse files
BUG: add function to check whether data is all scalar in pandas.array
1 parent c4e3ba0 commit 0a3846f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/_libs/lib.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,9 +865,10 @@ cpdef ndarray[object] ensure_string_array(
865865
def is_all_scalar(obj: list | tuple) -> bool:
866866
cdef:
867867
Py_ssize_t i, n = len(obj)
868-
bool all_scalars = True
869868
object temp
870869

870+
all_scalars = True
871+
871872
for i in range(n):
872873
temp = obj[i]
873874
if isinstance(temp, (bytes, str)):

0 commit comments

Comments
 (0)