pandas drop rows where specific column is nan 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