python dropna(how='all') code example
Example 1: drop column with nan values
fish_frame = fish_frame.dropna(axis = 1, how = 'all')
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|
# +---+------+-----+