dropna(axis=0) code example
Example 1: dropping nan in pandas dataframe
df.dropna(subset=['name', 'born'])
Example 2: drop columns with nan pandas
>>> df.dropna(axis='columns')
name
0 Alfred
1 Batman
2 Catwoman
df.dropna(subset=['name', 'born'])
>>> df.dropna(axis='columns')
name
0 Alfred
1 Batman
2 Catwoman