你可以使用一个技巧,将column.isNull()转换为int,然后计算它们的和。如果和大于0,则为真。
PySpark When Otherwise and SQL Case When on DataFrame with Examples – Similar to SQL and programming languages, PySpark supports a way to check multiple conditions in sequence and returns a value when the first condition met by usingSQL like case whenandwhen().otherwise()expressions, these works...