Filtering a Pandas DataFrame Without Removing Rows,"df.where((df > df.shift(1)).values & (df.D == 1)[:, (None)], np.nan)"