for element in my_series: if type(element) == float and pd.isna(element): print('do A') else: print('do B')