panda drop na code example
Example 1: dropna pandas
>>> df.dropna(axis='columns')
name
0 Alfred
1 Batman
2 Catwoman
Example 2: Returns a new DataFrame omitting rows with null values
# Returns a new DataFrame omitting rows with null values
df4.na.drop().show()
# +---+------+-----+
# |age|height| name|
# +---+------+-----+
# | 10| 80|Alice|
# +---+------+-----+