@user1672063: The following solve your problem:
# let name your initial record "record"
# record = [{'yanchor': 'bottom', 'xanchor': 'auto', 'x': u'2018-Q3', 'y': 169.80000000000001, 'text': '169.8', 'showarrow': False},..]
#
# Let initialise a new record
newrecord = []
for d in record:
if d['y'] is nan: # provided that you "import numpy.nan as nan" at the beginning
del d['y']
newrecord.append(d)
# The “newrecord” corresponds the new record without d[y] = nan.
solved Remove nan from annotations [closed]