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)

3rd Mar 2022, 10:31 PM
Mohammadreza Azadi Naieni
Mohammadreza Azadi Naieni - avatar
1 ответ
+ 1
Your output should be a pandas Series.
4th Mar 2022, 1:21 AM
Simon Sauter
Simon Sauter - avatar