arrow-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vibhatha Abeykoon <vibha...@gmail.com>
Subject PyArrow Compute is_null Usage
Date Wed, 18 Nov 2020 19:19:09 GMT
Hello,

I am looking into the is_null compute and observed the following.

import pyarrow as pa
arw_ar = pa.array([1, 2, 3, 4, None])
arw_ar_1 = pa.array([[1, 2, 3, 4, None], [11, 12, 13, None, 15]])
arw_ar_2 = pa.array([[1, 2, 3, 4], [1, 2, 3, 4]])
arw_ar_3 = pa.array([[None, None, None, None, None], [11, 12, 13, None, 15
]])

# Case 1 with random None value in a 1D array

print(arw_ar.is_null())

# [
# false,
# false,
# false,
# false,
# true
# ]

# Case 2 with random None value in a 2-D array

print(arw_ar_1.is_null())

# [
# false,
# false
# ]

# Case 3 without random None value in a 2-D array
print(arw_ar_2.is_null())

# [
# false,
# false
# ]

# Case 4 with None value in a 2-D array
print(arw_ar_3.is_null())
# [
# false,
# false
# ]

Is this an expected behavior?


With Regards,
Vibhatha Abeykoon,

Mime
View raw message