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