Weird null checking behaviour by pd.notnull
问题 This is essentially a rehashing of the content of my answer here. I came across some weird behaviour when trying to solve this question, using pd.notnull . Consider x = ('A4', nan) I want to check which of these items are null. Using np.isnan directly will throw a TypeError (but I've figured out how to solve that). Using pd.notnull does not work. >>> pd.notnull(x) True It treats the tuple as a single value (rather than an iterable of values). Furthermore, converting this to a list and then