I have a dataframe like shown below
df2 = pd.DataFrame({\'person_id\':[1],\'H1_date\' : [\'2006-10-30 00:00:00\'], \'H1\':[2.3],\'H2_date\' : [\'2016-10-30
You can use :
col = [x for x in df.columns if "date" in x]
for column in col:
df.dropna(subset=[column,column[:-4]], how = 'all',inplace=True)
subset will select the lines where the NA is detected, how specifies the conditions on the line (here all the of the 2 lines must be NA) and inplace modifies the current DataFrame