I tried to solve the required task with the following code line:
df['Age'][np.isnan(df["Age"])] = rand1
But this raises a "SettingWithCopyWarning" and I think locating the Nan values in the dataframe (Column 'Age') by using the .loc feature might be a better way of doing this. 
I already took a look at the documentation, but still don't know how I can fix this problem. Couldn't find any solutions on here with .loc either.
I would appreciate any hints and advice.

 
     
    