You have set up a DIY home weather station, which uses a bunch of different sensors (for humidity, temperature, etc), for a school project. For the past 4 days you have been collecting the data directly into your computer, but...
The data you have collected is inside a Pandas DataFrame and the cells containg the numpy.nan value are the missing data. For all numpy.nan values in data, you must find the k Nearest Neighbors and then replace the numpy.nan with the average of the found neighbors.
A Pandas DataFrame with the data, the number of k neighbors.
A Pandas DataFrame with the imputed data.