python program to drop rows with nan code example Example: dropping nan in pandas dataframe df.dropna(subset=['name', 'born'])