0
Missing Numbers challenge in Data Science course
@sololearn admin I got the same result as the target results, but the system doesn't recognize the result data as "SOLVED". please help, many thanks, here is my script: #====Missing Numbers====== import numpy as np import pandas as pd lst = [float(x) if x != 'nan' else np.NaN for x in input().split()] lst = pd.array(lst) k = -1 for i in lst: k+=1 if np.isnan(lst[k]): print(k,round(np.mean(lst),1)) else: print(k,round(lst[k],1)) print("dtype:",lst.dtype)
1 Answer
+ 1
Your output should be a pandas Series.