I want to use boolean indexing on numpy arrays and pandas series to select all rows with a value of <x in a certain column but also rows with nan values shall be included. I tried like in this small example but I get the error "ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"
import numpy as np
a = [0.5, 0, 1, 17, np.nan]
b = np.array(a)
c = b[b < 3 or b == np.nan]