df.dropna(subset = n_features, inplace = True) 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