how to iterate over dataframe and generate a new dataframe,"df2 = df[~pd.isnull(df.L)].loc[:, (['P', 'L'])].set_index('P')"